Skip to content

Commit

Permalink
Merge pull request #881 from snyk/feat/add-new-client-endpoint-filters
Browse files Browse the repository at this point in the history
feat: add new client endpoint filters
  • Loading branch information
andreiverciuc authored Nov 14, 2024
2 parents 927dbf4 + 36b6a76 commit 7c70daf
Show file tree
Hide file tree
Showing 10 changed files with 705 additions and 1 deletion.
16 changes: 16 additions & 0 deletions client-templates/azure-repos/accept.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,22 @@
"scheme": "basic",
"token": "${BROKER_CLIENT_VALIDATION_BASIC_AUTH}"
}
},
{
"//": "get pull-request info",
"method": "GET",
"path": "/:owner/_apis/git/repositories/:repo/pullrequests/:pullRef",
"origin": "https://${AZURE_REPOS_HOST}/${AZURE_REPOS_ORG}",
"valid": [
{
"queryParam": "api-version",
"values": ["7.1", ""]
}
],
"auth": {
"scheme": "basic",
"token": "${BROKER_CLIENT_VALIDATION_BASIC_AUTH}"
}
}
]
}
10 changes: 10 additions & 0 deletions client-templates/bitbucket-server-bearer-auth/accept.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,16 @@
"scheme": "bearer",
"token": "${BITBUCKET_PAT}"
}
},
{
"//": "get a single pull request info",
"method": "GET",
"path": "/rest/api/1.0/projects/:project/repos/:repo/pull-requests/:pullRequestId",
"origin": "https://${BITBUCKET}",
"auth": {
"scheme": "bearer",
"token": "${BITBUCKET_PAT}"
}
}
]
}
11 changes: 11 additions & 0 deletions client-templates/bitbucket-server/accept.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,17 @@
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "get a single pull request info",
"method": "GET",
"path": "/rest/api/1.0/projects/:project/repos/:repo/pull-requests/:pullRequestId",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
}
]
}
8 changes: 7 additions & 1 deletion client-templates/gitlab/accept.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,12 @@
"method": "GET",
"path": "/api/v4/personal_access_tokens/self",
"origin": "https://${GITLAB}"
}
},
{
"//": "get single pull request info",
"method": "GET",
"path": "/api/v4/projects/:project/merge_requests/:pullRef",
"origin": "https://${GITLAB}"
}
]
}
16 changes: 16 additions & 0 deletions defaultFilters/azure-repos.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,22 @@
"scheme": "basic",
"token": "${BROKER_CLIENT_VALIDATION_BASIC_AUTH}"
}
},
{
"//": "get pull-request info",
"method": "GET",
"path": "/:owner/_apis/git/repositories/:repo/pullrequests/:pullRef",
"origin": "https://${AZURE_REPOS_HOST}/${AZURE_REPOS_ORG}",
"valid": [
{
"queryParam": "api-version",
"values": ["7.1", ""]
}
],
"auth": {
"scheme": "basic",
"token": "${BROKER_CLIENT_VALIDATION_BASIC_AUTH}"
}
}
]
}
10 changes: 10 additions & 0 deletions defaultFilters/bitbucket-server-bearer-auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,16 @@
"scheme": "bearer",
"token": "${BITBUCKET_PAT}"
}
},
{
"//": "get a single pull request info",
"method": "GET",
"path": "/rest/api/1.0/projects/:project/repos/:repo/pull-requests/:pullRequestId",
"origin": "https://${BITBUCKET}",
"auth": {
"scheme": "bearer",
"token": "${BITBUCKET_PAT}"
}
}
]
}
11 changes: 11 additions & 0 deletions defaultFilters/bitbucket-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,17 @@
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "get a single pull request info",
"method": "GET",
"path": "/rest/api/1.0/projects/:project/repos/:repo/pull-requests/:pullRequestId",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
}
]
}
6 changes: 6 additions & 0 deletions defaultFilters/gitlab.json
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,12 @@
"method": "GET",
"path": "/api/v4/personal_access_tokens/self",
"origin": "https://${GITLAB}"
},
{
"//": "get single pull request info",
"method": "GET",
"path": "/api/v4/projects/:project/merge_requests/:pullRef",
"origin": "https://${GITLAB}"
}
]
}
Loading

0 comments on commit 7c70daf

Please sign in to comment.