The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
アトラシアンの山本です。この記事では Bitbucket Cloud での REST API による Mercurial リポジトリ一覧の取得方法を紹介します。
■背景
本年 2020-05-31 に Bitbucket での Mercurial サポート終了が予定されております。詳しくはブログ記事 Sunsetting Mercurial support in Bitbucket をご参照下さい。
■手順
既存の Mercurial レポジトリ一覧を取得して、影響範囲を調べたい方は下記例のように REST API を利用できます。
API_TOKEN="__YOUR_API_TOKEN__"
USERNAME="__YOUR_USERNAME__"
curl -L --request GET \
--user "${USERNAME}:${API_TOKEN}" \
--header "Accept: application/json" \
--url "https://api.bitbucket.org/2.0/repositories/?q=scm%20%3D%20%22hg%22&role=member"
レスポンスはページングされており、10件までのリポジトリが含まれています。続きのリポジトリ情報はレスポンスに含まれる "next" プロパティの URL から取得できます。例:
"next": "https://api.bitbucket.org/2.0/repositories/?q=scm+%3D+%22hg%22&after=2017-12-19T07%3A05%3A36.988129%2B00%3A00&role=member"
補足:
K_ Yamamoto
Atlassian TeamTechnical Support Engineer
Atlassian
Yokohama, Japan
10 accepted answers
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
0 comments