We have a requirement where we need to update a file in repo with the data we captured in Jira ticket when the Jira ticket reaches certain stage, say appoved. How to do this
Hello @Sharath P Bongale ,
Welcome to the Atlassian Community!
Can you kindly provide more details on what you are trying to achieve since I am not sure I understand correctly your requirements?
Are you trying to find a way to modify a text in a file that exist in a repository when an issue is transitioned to a given status?
If this is the case then I am afraid there is no such functionality available OOB since the integration is actually working the other way around: you can make a Jira issue transition to a desired status when an action happens on Bitbucket side, not vice-versa.
As written in the Connect Jira Cloud to Bitbucket Cloud documentation page:
By connecting to Bitbucket, you can:
- Surface repository activity – Jira issues automatically update to show repo branch, commit, pull request activity, and, if you have Bitbucket Pipelines enabled, your builds and deployments.
- Get deep integration in Bitbucket – See the core details of Jira issues without having to change context, from anywhere in Bitbucket you see a Jira issue key, including commit messages, pull request comments, and deployment information.
- Automate Jira workflows – Jira workflows sync with repo activity to update automatically as you work.
Read more about the benefits of integrating Jira applications with Bitbucket Cloud. If you're using a Jira Server application, see Linking a Bitbucket or GitHub repository with Jira.
As mentioned in the quoted text, see Integrate Bitbucket and Jira for more details.
Once this has been said, you may want to search our marketplace for any 3rd party app/add-on that offers this functionality.
Cheers,
Dario
@[deleted] : Yes Basically create a new file or update an existing file when issue is transitioned.
I was trying to use send web request automation.
When i tried with Postman, i am able to create file. With the same configuration in jira it didnt work. The issue i felt is data is being sent as raw data from jira but it was form data from postman. so this may be the challenge
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sharath P Bongale ,
I believe you are on the right path.
Can you kindly provide more information on the request are you able to send using postman?
Specifically:
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dario B : I am calling the rest api which is as below
https://api.bitbucket.org/2.0/repositories/username/repo_slug/src
Body is just key value pair. (Key being file name and value content of the file)
Authentication : I have used app password tagged to the user in Base64 encoding.
I am also able to create file using java code.
When i am invoking the same from Jira, commits are being happeing and file is not getting created. when i check the raw commit, its empty.
Is there a way i can get any support. else i have to write a utility outside jira which will be invoked by web request and in turn create the file
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sharath P Bongale ,
If calling the REST API endpoint works fine when sending the request using Postman or Curl (or other tools), then it is expected to work also when sending the request from an automation rule.
Details on how to configure the send web request action are in below link:
Can you kindly review the above page and check you are doing everything correctly?
Specifically, I am not sure what you mean with:
I have used app password tagged to the user in Base64 encoding.
Can you make sure your authentication header has the below form:
Name: Authorization
Value: Basic [BASE64 encoded <USERNAME>:<APP_PASSWORD>]
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.