File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 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({
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,
You can’t perform that action at this time.
0 commit comments