I've a question about commenting in Bitbucket. If I click on "diff" I have the possibility to compare two branches and i can comment each line of code with a separate comment.
Is there any possibility to have to same functionality with a command line tool or API or is this only possible with the webinterface?
I ask because I'm looking for a way to have this functionality in an IDE like eclipse f.e. via plugin.
Asked
Active
Viewed 261 times
0

Peter Reid
- 5,139
- 2
- 37
- 33

altralaser
- 2,035
- 5
- 36
- 55
-
Are you talking about bitbucket.org or bitbucket server? – Peter Reid Jun 20 '17 at 14:30
-
1Sorry, I forgot to say: The Bitbucket server. – altralaser Jun 20 '17 at 15:45
-
do you mean a diff on the pull request page? – Yuri G. Jun 22 '17 at 06:15
-
That's right, it's the diff page of a Pull Request. – altralaser Jun 22 '17 at 09:25
1 Answers
1
Assuming it is a pull request diff. Looking at the documentation for the File line comment
instructions block, shows that you can use the following request body
{
"text": "A pithy comment on a particular line within a file.",
"anchor": {
"diffType": "COMMIT",
"line": 1,
"lineType": "CONTEXT",
"fileType": "FROM",
"fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd",
"path": "path/to/file",
"srcPath": "path/to/file",
"toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b"
}
}

Yuri G.
- 4,323
- 1
- 17
- 32