https://api.bitbucket.org/2.0/repositories/{workspace}/{repo-slug}/pullrequests/{pull-request-id}
{
"title": "{new title}"
}
The above is the call from Jira automation. I am getting response 500, "something went wrong," which is too vague to give me any clues. I can do get pull request fine. Authentication is being done through app password with all pull request options checked.
Hi Anthony,
I checked the error code you provided in the other question here, but I couldn't find this error code in our system.
You said you are making this API call from Jira automation. We will need some additional details to reproduce the error and find out what causes it.
1. What is the trigger of this automation rule?
2. What is the action in the automation rule that performs this API call? Is it a Send web request?
3. If so, can you please hare some details, like:
https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/pullrequests/32
Kind regards,Theodora
Hi Theodora,
First, thank you for responding to my question. Here is the requested information. Please let me know if I was too vague for any portion, and I'll do my best to provide further detail.
1. It was originally triggered when the issue transitioned to "Deployment Assurance." Afterwards, I used the "validate" option in the "Send Web Request" interface to test and reproduce the problem.
2. Yes, it's "Send Web Request."
3. I am using smart values. The URL is "https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/pullrequests/{{pullRequest.id}}." pullRequest here refers to a pull request I previously retrieved using "get pull request." When trying the "validate" option, I used a hard coded URL instead, but as mentioned, the problem persisted.
I am using PUT, and yes, the custom data is following that format.
Yes, all the headers have been added as specified by "update pull request."
Thank you for the details.
This part is a bit unclear to me:
I am using smart values. The URL is "https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/pullrequests/{{pullRequest.id}}." pullRequest here refers to a pull request I previously retrieved using "get pull request." When trying the "validate" option, I used a hard coded URL instead, but as mentioned, the problem persisted.
curl -u username:app-password --request PUT \--url 'https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/pullrequests/23' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--data '{"title": "Some new title"}'
In bold are the values you need to replace with your own. I am asking this so we can narrow down if the issue is specific to the Jira automation rule or not.
Additionally, if you get any new error codes along with the 500 error (either from the automation rule or with curl), can you please provide them, just in case I get results in our system for the new error codes?
It looks like you're new here. Sign in or register to get started.