I have jira and bitbucket instance and I need to write a script to create bitbucket project and repository with the information from JIRA. I know python so have to do it with python:
1. Script should select issues of JIRA with project key in my case it is 'BR' and status To Do.
2. Script should read values of Bitbucket Project Name, Bitbucket Repository Name fields
3. Script should open a new Bitbucket project with Bitbucket Project Name if the project not exists
4. Script should open a new Bitbucket repository with Bitbucket Repository Name under project with Bitbucket Project Name
5. Script should update(create transition) JIRA issue. After the process JIRA issue should have status "Done"
Could someone help me about this. Thank you in advance!
The good news is that, I think, Python is the perfect tool to solve this.
You have to make calls to the Jira ad Bitbucket REST APIs. The REST API endpoints are very well documented and you can find Python examples, as well.
Hints:
For 1, just run a JQL query like this via the REST API: "project=BR and status=To Do".
Then iterate over the result, pick the values of the fields you mentioned, connect to Bitbucket, check the existence, create if not existing yet, and so on.
It is not very hard, good luck!
@Abdullah Dursun hi there! I see two very good solutions pointed out in the comments above. I'd like to simply add an alternative way of connecting the two systems. You can use ZigiOps. It's an external no-code tool, that connects the systems instantly and allows you to transfer the information you need. You can also sync the data between them because it establishes a bi-directional connection. Feel free to look at it as a reference for future projects and even book a demo to see how it can help you.
Regards, Diana (ZigiWave)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Abdullah Dursun
Welcome to the community!
You can check various REST APIs for Bitbucket Cloud here which you may use for the custom scripting.
I hope this helps.
Kind regards,
Karthick S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.