Skip to content

Commit 3712b75

Browse files
authored
Fix concurrency issue in gemini-cli workflow (#26)
This PR addresses a concurrency issue in the `gemini-cli` workflow that could cause multiple workflow to be canceled when comments from the same branch/repo triggered the gemini-cli workflow. The previous concurrency key was too broad, using `github.head_ref` or `github.ref`, which are not always relevant in the context of an `issue_comment` event. The fix simplifies the concurrency group to be solely based on the issue number: ```yaml concurrency: group: '${{ github.workflow }}-${{ github.event.issue.number }}' cancel-in-progress: true ``` This ensures that only one instance of the workflow runs per issue at any given time, correctly canceling any in-progress runs when a new comment is created or an existing one is edited.
1 parent 6f51179 commit 3712b75

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/gemini-cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- 'created'
1313

1414
concurrency:
15-
group: '${{ github.workflow }}-${{ github.head_ref || github.ref || github.event.issue.number }}'
15+
group: '${{ github.workflow }}-${{ github.event.issue.number }}'
1616
cancel-in-progress: true
1717

1818
defaults:

workflows/gemini-cli/gemini-cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- 'created'
1313

1414
concurrency:
15-
group: '${{ github.workflow }}-${{ github.head_ref || github.ref || github.event.issue.number }}'
15+
group: '${{ github.workflow }}-${{ github.event.issue.number }}'
1616
cancel-in-progress: true
1717

1818
defaults:

0 commit comments

Comments
 (0)