Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

General commit comments in BitBucket

Matthew Ryan April 25, 2018

The BitBucket REST API documents how to create a comment on a commit that is not anchored to any specific file: https://docs.atlassian.com/bitbucket-server/rest/5.3.3/bitbucket-rest.html#idm139015434965472

And this seems to be accepted by a server (at least in 5.3.3).

 

However, such comments do not show up in the UI, and there doesn't seem to be

a way to retrieve them from the API.  Is this something that is fixed in later versions?

I couldn't find anything in the relnotes.

 

I'm asking because I'm trying to migrate data from a github enterprise instance which has a number of general commit comments.

1 answer

1 accepted

0 votes
Answer accepted
Kristy
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2018

Hi @Matthew Ryan,

 

You are correct that there is no place in the UI to show comments created on a commit without being anchored to a file. This is by design, and it was a mistake that the REST API supports creating these comments. You might notice that the REST API doesn't actually support getting these comments back either - we require a path to be set.

Thank you for bringing this bug to our attention. I have gone ahead and created BSERV-10845 to document the behaviour of the REST API and its faulty documentation.

 

Since we don't support commit-level comments that aren't attached to a file, the best solution I can suggest is for you to attach the comment to a file in the commit. To do this, you can first get the files for the commit via the changes REST API, select the first file on the commit and attach the comment to this file.

 

Hope this helps, and all the best with your migration.

Regards,

Kristy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events