Skip to content

Commit

Permalink
Merge pull request #689 from snyk/fix/add-missing-apprisk-bitbucket-r…
Browse files Browse the repository at this point in the history
…ules

Add missing AppRisk Bitbucket filter rules
  • Loading branch information
pavel-snyk authored Jan 11, 2024
2 parents 5db675d + 202f6e4 commit a356ca4
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 4 deletions.
59 changes: 57 additions & 2 deletions defaultFilters/apprisk/bitbucket-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}
},
{
"//": "list the user's workspaces - AppRisk connector",
"//": "list the user's workspaces",
"method": "GET",
"path": "/workspaces",
"origin": "https://${BITBUCKET_API}",
Expand All @@ -55,7 +55,7 @@
}
},
{
"//": "list the user's workspaces - AppRisk connector",
"//": "list the user's projects",
"method": "GET",
"path": "/projects",
"origin": "https://${BITBUCKET_API}",
Expand Down Expand Up @@ -86,5 +86,60 @@
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to get repositories for a given workspace",
"method": "GET",
"path": "/repositories/:workspace",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to get repository",
"method": "GET",
"path": "/repositories/:workspace/:repo",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to get pull requests for a given repo",
"method": "GET",
"path": "/repositories/:workspace/:repo/pullrequests",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "list commits for a given repo",
"method": "GET",
"path": "/repositories/:workspace/:repo/commits",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "list members for a given workspace",
"method": "GET",
"path": "/workspaces/:workspace/members",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
}
]
59 changes: 57 additions & 2 deletions test/unit/__snapshots__/runtime-rules-hotloading.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,7 @@ Object {
"path": "/:workspace/:repo/diffstat/commits/:sha",
},
Object {
"//": "list the user's workspaces - AppRisk connector",
"//": "list the user's workspaces",
"auth": Object {
"password": "\${BITBUCKET_PASSWORD}",
"scheme": "basic",
Expand All @@ -1737,7 +1737,7 @@ Object {
"path": "/workspaces",
},
Object {
"//": "list the user's workspaces - AppRisk connector",
"//": "list the user's projects",
"auth": Object {
"password": "\${BITBUCKET_PASSWORD}",
"scheme": "basic",
Expand Down Expand Up @@ -1769,6 +1769,61 @@ Object {
"origin": "https://\${BITBUCKET_API}",
"path": "/admin/groups/more-members",
},
Object {
"//": "used to get repositories for a given workspace",
"auth": Object {
"password": "\${BITBUCKET_PASSWORD}",
"scheme": "basic",
"username": "\${BITBUCKET_USERNAME}",
},
"method": "GET",
"origin": "https://\${BITBUCKET_API}",
"path": "/repositories/:workspace",
},
Object {
"//": "used to get repository",
"auth": Object {
"password": "\${BITBUCKET_PASSWORD}",
"scheme": "basic",
"username": "\${BITBUCKET_USERNAME}",
},
"method": "GET",
"origin": "https://\${BITBUCKET_API}",
"path": "/repositories/:workspace/:repo",
},
Object {
"//": "used to get pull requests for a given repo",
"auth": Object {
"password": "\${BITBUCKET_PASSWORD}",
"scheme": "basic",
"username": "\${BITBUCKET_USERNAME}",
},
"method": "GET",
"origin": "https://\${BITBUCKET_API}",
"path": "/repositories/:workspace/:repo/pullrequests",
},
Object {
"//": "list commits for a given repo",
"auth": Object {
"password": "\${BITBUCKET_PASSWORD}",
"scheme": "basic",
"username": "\${BITBUCKET_USERNAME}",
},
"method": "GET",
"origin": "https://\${BITBUCKET_API}",
"path": "/repositories/:workspace/:repo/commits",
},
Object {
"//": "list members for a given workspace",
"auth": Object {
"password": "\${BITBUCKET_PASSWORD}",
"scheme": "basic",
"username": "\${BITBUCKET_USERNAME}",
},
"method": "GET",
"origin": "https://\${BITBUCKET_API}",
"path": "/workspaces/:workspace/members",
},
],
"public": Array [
Object {
Expand Down

0 comments on commit a356ca4

Please sign in to comment.