Skip to content

Commit 5d6dbc7

Browse files
committed
fix: workflow check
1 parent f339d31 commit 5d6dbc7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/pr-auto-assign.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ jobs:
4949
with:
5050
script: |
5151
const assignee = 'baspa';
52+
const prAuthor = context.payload.pull_request.user.login;
53+
54+
console.log(`PR Author: ${prAuthor}`);
55+
console.log(`Assignee: ${assignee}`);
56+
console.log(`Are they the same? ${prAuthor.toLowerCase() === assignee.toLowerCase()}`);
5257
5358
// Always assign as assignee (you can be assigned to your own PR)
5459
github.rest.issues.addAssignees({
@@ -59,8 +64,8 @@ jobs:
5964
});
6065
console.log(`Assigned ${assignee} as assignee`);
6166
62-
// Only assign reviewer if they are not the PR author
63-
if (context.payload.pull_request.user.login !== assignee) {
67+
// Only assign reviewer if they are not the PR author (case-insensitive comparison)
68+
if (prAuthor.toLowerCase() !== assignee.toLowerCase()) {
6469
github.rest.pulls.requestReviewers({
6570
owner: context.repo.owner,
6671
repo: context.repo.repo,

0 commit comments

Comments
 (0)