Skip to content

Commit 17bc5a5

Browse files
committed
CI: give issue and issue_comment labeler runs unique concurrency groups
A second comment on the same pull request was sharing one concurrency group and cancelling an in-progress issues/issue_comment labeling run, so dialects declared in the cancelled comment were never applied. Main has no concurrency block, so this restores that behavior. Use github.run_id for those events and keep the pull-request workflow_run group keyed by head repository and branch. Signed-off-by: Vincent <[email protected]>
1 parent 055de06 commit 17bc5a5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎.github/workflows/labeler.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ name: labeler
2121
# runs from the default branch when `pull_request_signal.yml` starts, so it
2222
# never runs pull request code. See that file for details.
2323
#
24-
# `issues` and `issue_comment` already run from the default branch and are
25-
# unchanged.
24+
# `issues` and `issue_comment` already run from the default branch.
25+
# Their concurrency group uses `github.run_id` so a later comment on the
26+
# same issue does not cancel an in-progress labeling run.
2627
concurrency:
27-
group: ${{ github.repository }}-${{ github.event.workflow_run.head_repository.full_name || github.event.issue.number }}-${{ github.event.workflow_run.head_branch || github.event_name }}-${{ github.workflow }}
28+
group: ${{ github.repository }}-${{ github.event_name == 'workflow_run' && format('{0}-{1}', github.event.workflow_run.head_repository.full_name, github.event.workflow_run.head_branch) || github.run_id }}-${{ github.workflow }}
2829
cancel-in-progress: true
2930

3031
on:

0 commit comments

Comments
 (0)