Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bitbucket] Support pull request comments on specific lines #1439

Open
MarkRx opened this issue Jul 30, 2024 · 1 comment
Open

[Bitbucket] Support pull request comments on specific lines #1439

MarkRx opened this issue Jul 30, 2024 · 1 comment

Comments

@MarkRx
Copy link

MarkRx commented Jul 30, 2024

Currently comments can only be added to the overall section of a PR. The Bitbucket Data Center REST API supports adding comments to specific lines within a file by using the "anchor" field. The Bitbucket Cloud REST API uses an "inline" field.

Example Bitbucket Data Center:
General file comment:

 {
     "text": "An insightful general comment on a file.",
     "anchor": {
         "diffType": "RANGE",
         "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd",
         "path": "path/to/file",
         "srcPath": "path/to/file",
         "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b"
     }
 }

File line comment:

{
    "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"
    }
}

Example Bitbucket Data Center:

  "inline": {
    "from": 57,
    "to": 122,
    "path": "<string>"
  },
@ZultanH
Copy link

ZultanH commented Aug 7, 2024

I second this, would be very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants