Skip to content

Commit

Permalink
Merge pull request #457 from snyk-tech-services/fix/match-projects-ke…
Browse files Browse the repository at this point in the history
…ys-exactly-in-bbs-search

fix: match project keys exactly in BBS search
  • Loading branch information
jacek-rzrz authored Jul 13, 2023
2 parents 3e69b24 + 12553de commit 0304771
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/lib/source-handlers/bitbucket-server/list-repos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ const getRepos = async (
const { values, isLastPage, nextPageStart } = body;
start = nextPageStart || -1;
for (const repo of values) {
repos.push({ projectKey: repo.project.key, repoSlug: repo.name });
if (repo.project.key === projectKey) {
repos.push({ projectKey: repo.project.key, repoSlug: repo.name });
}
}
return { repos, isLastPage, start };
};
Expand Down
2 changes: 1 addition & 1 deletion test/system/fixtures/org-data/bitbucket-server-orgs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"orgData": [
{
"name": "antoine-snyk-demo",
"name": "AN",
"orgId": "<snyk_org_id>",
"integrations": {
"bitbucket-server": "<snyk_org_integration_id>"
Expand Down

0 comments on commit 0304771

Please sign in to comment.