Skip to content

Add concurrency cancellation to PR-triggered workflows missing it #2596

Description

@mukeshpanchal27

Description

Several workflows cancel superseded runs via a concurrency group (js-lint, php-lint, php-test-plugins, plugin-check, codeql, props-bot). The following do not, so pushing multiple times to a PR runs duplicate jobs to completion:

  • .github/workflows/e2e-test.yml
  • .github/workflows/spell-check.yml
  • .github/workflows/add-pr-labels.yml

Impact

Wasted Actions minutes and slower feedback when a PR is updated in quick succession.

Proposed fix

Add the same block already used elsewhere in the repo:

concurrency:
  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
  cancel-in-progress: true

Location

  • .github/workflows/e2e-test.yml
  • .github/workflows/spell-check.yml
  • .github/workflows/add-pr-labels.yml

Acceptance criteria

  • Each workflow above has a concurrency group with cancel-in-progress: true.
  • Superseded PR runs are cancelled when a new commit is pushed.

Metadata

Metadata

Assignees

Labels

ContributorDayIssues flagged as Contributor Day candidates.Good First IssueIssue particularly suitable to be worked on by new contributors[Type] EnhancementA suggestion for improvement of an existing feature

Type

No type

Projects

Status
Done 😃

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions