Skip to content

Commit 3551929

Browse files
committed
fix(repo): only exact /assign and /unassign comments start a claim job
1 parent a89aa63 commit 3551929

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎.github/workflows/assign.yaml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ permissions:
1111

1212
jobs:
1313
claim:
14-
# Issues only (a PR comment also fires issue_comment), and only comments that mention a command.
14+
# Issues only (a PR comment also fires issue_comment), and only comments that are exactly a command (allowing a
15+
# trailing space or line break), so other comments never queue here and can't push a waiting command out.
1516
if: >-
1617
github.event.issue.pull_request == null &&
17-
(contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/unassign'))
18-
# Per job, so only real commands queue here and other comments can't cancel a waiting one.
18+
contains(fromJSON('["/assign", "/assign ", "/assign\n", "/assign\r\n", "/unassign", "/unassign ", "/unassign\n", "/unassign\r\n"]'), github.event.comment.body)
19+
# Per job, so only runs that pass the condition above share the queue.
1920
concurrency:
2021
group: claim-${{ github.event.issue.number }}
2122
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)