Skip to content

Commit

Permalink
fix(approvals-satisfied): remove @ from usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
sjschmidt93 authored Jul 9, 2024
1 parent 4a3a2d4 commit d138ad2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/431.index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/431.index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/676.index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/676.index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/helpers/approvals-satisfied.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const approvalsSatisfied = async ({
if (isTeam(teamOrUsers)) {
return await fetchTeamLogins(teamOrUsers);
} else {
return teamOrUsers.split(',');
return teamOrUsers.replaceAll('@', '').split(',');
}
});
const codeOwnerLogins = uniq(loginsLists.flat());
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/approvals-satisfied.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ describe('approvalsSatisfied', () => {
]
});
const result = await approvalsSatisfied({
users: 'user1,user2',
users: '@user1,@user2',
pull_number: '12345'
});
expect(octokit.pulls.listReviews).toHaveBeenCalledWith({ pull_number: 12345, repo: 'repo', owner: 'owner', page: 1, per_page: 100 });
Expand All @@ -543,7 +543,7 @@ describe('approvalsSatisfied', () => {
]
});
const result = await approvalsSatisfied({
users: 'user1,user2',
users: '@user1,@user2',
pull_number: '12345'
});
expect(octokit.pulls.listReviews).toHaveBeenCalledWith({ pull_number: 12345, repo: 'repo', owner: 'owner', page: 1, per_page: 100 });
Expand Down

0 comments on commit d138ad2

Please sign in to comment.