Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ai-moderator.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/auto-triage-issues.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/bot-detection.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/changeset.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/example-custom-error-patterns.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/issue-classifier.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/security-compliance.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/test-dispatcher.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/workflow-generator.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions docs/src/content/docs/reference/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ Workflow-level concurrency groups include the workflow name plus context-specifi

| Trigger Type | Concurrency Group | Cancel In Progress |
|--------------|-------------------|-------------------|
| Issues | `gh-aw-${{ github.workflow }}-${{ issue.number }}` | No |
| Pull Requests | `gh-aw-${{ github.workflow }}-${{ pr.number \|\| ref }}` | Yes (new commits cancel outdated runs) |
| Push | `gh-aw-${{ github.workflow }}-${{ github.ref }}` | No |
| Issues | `gh-aw-${{ github.workflow }}` | No |
| Pull Requests | `gh-aw-${{ github.workflow }}` | Yes (new commits cancel outdated runs) |
| Push | `gh-aw-${{ github.workflow }}` | No |
| Discussions | `gh-aw-${{ github.workflow }}` | No |
| Schedule/Other | `gh-aw-${{ github.workflow }}` | No |
| Command Triggers | `gh-aw-${{ github.workflow }}-${{ issue.number \|\| pr.number }}` | No |

This ensures workflows on different issues, PRs, or branches run concurrently without interference.

Expand Down
22 changes: 1 addition & 21 deletions pkg/workflow/concurrency.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,28 +132,8 @@ func buildConcurrencyGroupKeys(workflowData *WorkflowData, isCommandTrigger bool
if isCommandTrigger {
// For command workflows: use issue/PR number
keys = append(keys, "${{ github.event.issue.number || github.event.pull_request.number }}")
} else if isPullRequestWorkflow(workflowData.On) && isIssueWorkflow(workflowData.On) {
// Mixed workflows with both issue and PR triggers: use issue/PR number
keys = append(keys, "${{ github.event.issue.number || github.event.pull_request.number }}")
} else if isPullRequestWorkflow(workflowData.On) && isDiscussionWorkflow(workflowData.On) {
// Mixed workflows with PR and discussion triggers: use PR/discussion number
keys = append(keys, "${{ github.event.pull_request.number || github.event.discussion.number }}")
} else if isIssueWorkflow(workflowData.On) && isDiscussionWorkflow(workflowData.On) {
// Mixed workflows with issue and discussion triggers: use issue/discussion number
keys = append(keys, "${{ github.event.issue.number || github.event.discussion.number }}")
} else if isPullRequestWorkflow(workflowData.On) {
// Pure PR workflows: use PR number if available, otherwise fall back to ref for compatibility
keys = append(keys, "${{ github.event.pull_request.number || github.ref }}")
} else if isIssueWorkflow(workflowData.On) {
// Issue workflows: use issue number
keys = append(keys, "${{ github.event.issue.number }}")
} else if isDiscussionWorkflow(workflowData.On) {
// Discussion workflows: use discussion number
keys = append(keys, "${{ github.event.discussion.number }}")
} else if isPushWorkflow(workflowData.On) {
// Push workflows: use ref to differentiate between branches
keys = append(keys, "${{ github.ref }}")
}
// All other workflows: sequentialize per workflow (no event-specific keys)

return keys
}
Expand Down
Loading