Hi,
Description is not showing when I posted a build status update for a commit using the Rest API using this link
https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/
I am using the PowerShell Invoke-WebRequest method to post the update on the Bitbucket commit.
{
"state": "INPROGRESS",
"key": "TEST",
"name": "TEST",
"url": "testurl/console",
"description": "Changes by Amulya"
}
All other 4 are visible except description. Can anyone please help me find the issue?
The versions we use are
Hey there Amulya,
First off, let me kindly warn you that even though you blurred your bearer token out in the first picture, it is present and visible in the second.
That aside, would it be possible to see the entirety of the code? The last part of the web request is not visible, nor is it possble to see how the JSON is constructed.
Taking a wild guess here, but if everything else updated besides the description, it may be that the description you are trying to pass is not correctly formatted? Have you tried passing it manually before just to debug?
Best regards,
Zuri Suwru
Hi Zuri, thank you for your reply.
Yes, I am posting the entire code here. I tried to pass the description manually, which was copied from the Atlassian documentation, also but still not visible. Also, thank you; I updated images on my original post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case you navigate (or send a GET request via your preferred way) to the following URL using your test case's commit hash, inside the response, what is the description you see?
https://<bitbucketBaseURL>/rest/build-status/latest/commits/<commitID>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am able to see the description I posted through POST request via the url you provided
but I can't see it in the UI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This means your script works perfectly fine, the issue isn't with your code.
Unfortunately though, the description field isn't really shown in BitBucket anymore (from what I've gathered trying to debug your case). In fact, the images you see, alongside the guide from your link above are all from 2017, on a way earlier version of BitBucket.
To change the message you see on the builds tab, you must update the message you commit/push with, not the build status description via POSTing.
Sorry for the letdown, hopefully you'll find an alternative way to achieve something similar for reporting/auditing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alright, thank you for the information, I will find an alternative.
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.