Skip to content

Commit 53b72c9

Browse files
committed
fix: address reviewer feedback on concurrency, dead code, and bot skip
- Remove MAX_ASSIGNEES from constants.js and reviewers-assignee-index.js; it was dead code since nothing reads it after the cap was removed - Unify the concurrency group to reviewer-assignee-{PR} for all event types so an add and remove for the same PR cannot race - Skip the job entirely when the actor is a bot (contains '[bot]') to avoid triggering on dependabot or other automated review requests Signed-off-by: Mounil Kanakhara <mounilkankhara@gmail.com>
1 parent ddfa452 commit 53b72c9

3 files changed

Lines changed: 2 additions & 8 deletions

File tree

.github/scripts/shared/helpers/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
*/
88

99
module.exports = {
10-
MAX_ASSIGNEES: 2,
1110
BOT_NAME_ASSIGNEES: 'reviewers-assignee',
1211
};

.github/scripts/shared/helpers/reviewers-assignee-index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ const constants = require('./constants.js');
1010

1111
module.exports = {
1212
createLogger,
13-
MAX_ASSIGNEES: constants.MAX_ASSIGNEES,
1413
BOT_NAME_ASSIGNEES: constants.BOT_NAME_ASSIGNEES,
1514
};

.github/workflows/on-review.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,10 @@ jobs:
2323
add-reviewers-as-assignees:
2424
name: Add Reviewers as Assignees
2525
runs-on: hl-sdk-py-lin-md
26+
if: "!contains(github.actor, '[bot]')"
2627

2728
concurrency:
28-
group: >-
29-
${{
30-
github.event_name == 'pull_request_review'
31-
&& format('reviewer-removal-{0}-{1}', github.event.pull_request.number, github.event.review.user.login)
32-
|| format('reviewer-assignee-{0}', github.event.pull_request.number || inputs.pr_number || github.run_id)
33-
}}
29+
group: reviewer-assignee-${{ github.event.pull_request.number || inputs.pr_number || github.run_id }}
3430
cancel-in-progress: false
3531

3632
steps:

0 commit comments

Comments
 (0)