0

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.

Peter Reid
  • 5,139
  • 2
  • 37
  • 33
altralaser
  • 2,035
  • 5
  • 36
  • 55

1 Answers1

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