Skip to content

Commit

Permalink
Merge pull request #883 from snyk/TREX-1513-bbs-add-broker-support
Browse files Browse the repository at this point in the history
feat: Add bitbucket server inline comment and resolution
  • Loading branch information
sandro-maculan authored Nov 22, 2024
2 parents 54d7f41 + c95ae93 commit 6560dce
Show file tree
Hide file tree
Showing 6 changed files with 640 additions and 0 deletions.
20 changes: 20 additions & 0 deletions client-templates/bitbucket-server-bearer-auth/accept.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,26 @@
"token": "${BITBUCKET_PAT}"
}
},
{
"//": "create an inline pull request comment",
"method": "POST",
"path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "bearer",
"token": "${BITBUCKET_PAT}"
}
},
{
"//": "resolve a pull request comment",
"method": "POST",
"path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "bearer",
"token": "${BITBUCKET_PAT}"
}
},
{
"//": "used to validate credentials",
"method": "GET",
Expand Down
22 changes: 22 additions & 0 deletions client-templates/bitbucket-server/accept.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,28 @@
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "create an inline pull request comment",
"method": "POST",
"path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "resolve a pull request comment",
"method": "POST",
"path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to validate credentials",
"method": "GET",
Expand Down
20 changes: 20 additions & 0 deletions defaultFilters/bitbucket-server-bearer-auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,26 @@
"token": "${BITBUCKET_PAT}"
}
},
{
"//": "create an inline pull request comment",
"method": "POST",
"path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "bearer",
"token": "${BITBUCKET_PAT}"
}
},
{
"//": "resolve a pull request comment",
"method": "POST",
"path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "bearer",
"token": "${BITBUCKET_PAT}"
}
},
{
"//": "used to validate credentials",
"method": "GET",
Expand Down
22 changes: 22 additions & 0 deletions defaultFilters/bitbucket-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,28 @@
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "create an inline pull request comment",
"method": "POST",
"path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "resolve a pull request comment",
"method": "POST",
"path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to validate credentials",
"method": "GET",
Expand Down
Loading

0 comments on commit 6560dce

Please sign in to comment.