How to list BitBucket repositories with sparrow

Listing BitBucket repositories could be annoying task even though BitBucket exposes a Rest API for this, and the reason for it is pagination - BitBucket sends result back spited by pages, so you need to request a next page till the end. This is hard to automate and prevent me form using BitBucket API directly.

Well, I have dropped a small sparrow plugin to handle with this task. At least it works for me. It lists ( in plain text format ) all the repositories for given project and team. There a lot of option of plugin you will find at documentation but the usual workflow is:

install plugin

$ sparrow plg install bitbucket-repo-list

run plugin

Here you lists repositories for given project and team. You should supply your Bitbucket credentials to request team/project information:

$ sparrow plg run bitbucket-repo-list \
--param login=superuser --param password=keep-it-secret \
--param team=heroes \
--param project=humans

That is it. Hopefully will be useful for someone deal with BitBucket repositories.

Leave a comment

About melezhik

user-pic Dev & Devops --- Then I beheld all the work of God, that a man cannot find out the work that is done under the sun: because though a man labour to seek it out, yet he shall not find it; yea further; though a wise man think to know it, yet shall he not be able to find it. (Ecclesiastes 8:17)