You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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
Technical Support Engineer
Atlassian, K.K.
Yokohama, Japan
10 accepted answers
0 comments