diff --git a/client-templates/bitbucket-server-bearer-auth/accept.json.sample b/client-templates/bitbucket-server-bearer-auth/accept.json.sample index e50a5e25a..412ffdcb3 100644 --- a/client-templates/bitbucket-server-bearer-auth/accept.json.sample +++ b/client-templates/bitbucket-server-bearer-auth/accept.json.sample @@ -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", diff --git a/client-templates/bitbucket-server/accept.json.sample b/client-templates/bitbucket-server/accept.json.sample index 6dccfce48..924384c64 100644 --- a/client-templates/bitbucket-server/accept.json.sample +++ b/client-templates/bitbucket-server/accept.json.sample @@ -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", diff --git a/defaultFilters/bitbucket-server-bearer-auth.json b/defaultFilters/bitbucket-server-bearer-auth.json index e50a5e25a..412ffdcb3 100644 --- a/defaultFilters/bitbucket-server-bearer-auth.json +++ b/defaultFilters/bitbucket-server-bearer-auth.json @@ -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", diff --git a/defaultFilters/bitbucket-server.json b/defaultFilters/bitbucket-server.json index 8e9e1300c..b1d662993 100644 --- a/defaultFilters/bitbucket-server.json +++ b/defaultFilters/bitbucket-server.json @@ -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", diff --git a/test/unit/__snapshots__/runtime-rules-hotloading.test.ts.snap b/test/unit/__snapshots__/runtime-rules-hotloading.test.ts.snap index f92c30a01..2cc1e453f 100644 --- a/test/unit/__snapshots__/runtime-rules-hotloading.test.ts.snap +++ b/test/unit/__snapshots__/runtime-rules-hotloading.test.ts.snap @@ -1377,6 +1377,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -2481,6 +2503,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -9582,6 +9624,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -10808,6 +10872,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -17866,6 +17950,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -18948,6 +19054,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -25764,6 +25890,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -26879,6 +27027,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -33771,6 +33939,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -34908,6 +35098,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -41852,6 +42062,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -42967,6 +43199,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -50300,6 +50552,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -51596,6 +51870,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -52722,6 +53018,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -53902,6 +54218,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -66127,6 +66463,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -67209,6 +67567,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -73983,6 +74361,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -75065,6 +75465,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -81839,6 +82259,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -82921,6 +83363,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -89695,6 +90157,28 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "password": "\${BITBUCKET_PASSWORD}", + "scheme": "basic", + "username": "\${BITBUCKET_USERNAME}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { @@ -90777,6 +91261,26 @@ Object { "origin": "https://\${BITBUCKET_API}", "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId", }, + Object { + "//": "create an inline pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/inline-comments", + }, + Object { + "//": "resolve a pull request comment", + "auth": Object { + "scheme": "bearer", + "token": "\${BITBUCKET_PAT}", + }, + "method": "POST", + "origin": "https://\${BITBUCKET_API}", + "path": "/projects/:project/repos/:repo/pull-requests/:pullRequestId/comments/:commentId/resolve", + }, Object { "//": "used to validate credentials", "auth": Object { diff --git a/test/unit/filters.test.ts b/test/unit/filters.test.ts index a249134a4..526f9483a 100644 --- a/test/unit/filters.test.ts +++ b/test/unit/filters.test.ts @@ -133,6 +133,32 @@ describe('filters', () => { expect(filterResponseUrl).toMatch(url); }); + it('should allow creating an inline pull request comment', () => { + const url = + '/projects/test-org/repos/test-repo/pull-requests/1/inline-comments'; + + const filterResponse = filter({ + url, + method: 'POST', + }); + expect(filterResponse).not.toEqual(false); + const filterResponseUrl = filterResponse ? filterResponse.url : ''; + expect(filterResponseUrl).toMatch(url); + }); + + it('should allow resolving a pull request comment', () => { + const url = + '/projects/test-org/repos/test-repo/pull-requests/1/comments/12345/resolve'; + + const filterResponse = filter({ + url, + method: 'POST', + }); + expect(filterResponse).not.toEqual(false); + const filterResponseUrl = filterResponse ? filterResponse.url : ''; + expect(filterResponseUrl).toMatch(url); + }); + it('should allow searching permissions', () => { const url = '/rest/api/1.0/projects/:project/repos/:repo/permissions/search'; @@ -205,6 +231,32 @@ describe('filters', () => { expect(filterResponseUrl).toMatch(url); }); + it('should allow creating an inline pull request comment', () => { + const url = + '/projects/test-org/repos/test-repo/pull-requests/1/inline-comments'; + + const filterResponse = filter({ + url, + method: 'POST', + }); + expect(filterResponse).not.toEqual(false); + const filterResponseUrl = filterResponse ? filterResponse.url : ''; + expect(filterResponseUrl).toMatch(url); + }); + + it('should allow resolving a pull request comment', () => { + const url = + '/projects/test-org/repos/test-repo/pull-requests/1/comments/12345/resolve'; + + const filterResponse = filter({ + url, + method: 'POST', + }); + expect(filterResponse).not.toEqual(false); + const filterResponseUrl = filterResponse ? filterResponse.url : ''; + expect(filterResponseUrl).toMatch(url); + }); + it('should allow searching permissions', () => { const url = '/rest/api/1.0/projects/:project/repos/:repo/permissions/search';