How to add DVCS Repositories via API to Atlassian Jira

by | May 16, 2019

We had a client reach out to us, asking how they could add repositories to Jira via the API. Unfortunately, there is no official API for this, and thus, no method that Atlassian supports for doing this. We dug into the private APIs and dug up how to do this. The APIs are the same for Bitbucket, GitHub, and GitHub Enterprise. These API calls are based on the idea that you have already established a connection between Jira and your DVCS server of choice, and are now looking specifically to add repositories to sync. We’re sharing this with everyone so that you can benefit from this as well:

[pastacode lang=”bash” user=”atlasauthority” repos=”one-offs” path_id=”jira/addDVCSRepos.sh” revision=”master” highlight=”” lines=”” provider=”bitbucket”/]

Please do keep in mind that this is not a supported method of doing this. If you contact Atlassian about this, they will not support you. If you need help solving advanced Atlassian challenges like this one, please reach out!

Subscribe to receive our monthly
blog posts in your inbox

Share This