Skip to content
Draft
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
3 changes: 2 additions & 1 deletion .github/workflows/codeowners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: 'Code Owners'

concurrency:
group: codeowners-${{ github.ref }}
cancel-in-progress: true
# queue duplicate runs - cancelled runs read as a failed check (#195)
cancel-in-progress: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Pending runs still get cancelled

If three or more pull-request events arrive while the first run is executing, GitHub retains only one pending run and cancels the older pending run, causing the cancellation-related failed required check that this change intends to prevent.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!


on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rerun_codeowners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
checks: read
steps:
- name: 'Rerun Checks'
uses: shqear93/rerun-checks@fd4069ad25c810179f1cb7437f5535fdf4a8b0fa # v3
uses: shqear93/rerun-checks@fd4069ad25c810179f1cb7437f5535fdf4a8b0fa # v3.1.0
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
check-names: 'Run Codeowners Plus'
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ name: 'Code Owners'

concurrency:
group: codeowners-${{ github.ref }}
cancel-in-progress: true
# queue duplicate runs - cancelled runs read as a failed check (#195)
cancel-in-progress: false

on:
pull_request:
Expand Down Expand Up @@ -103,7 +104,7 @@ jobs:

The `Codeowners Plus` GitHub Action should be set up as a [required status check](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-status-checks-before-merging) in a GitHub Workflow.

It is recommended to also set up a rerun workflow on `pull_request_review` to rerun the check (see [.github/workflows/rerun_codeowners.yml](.github/workflows/rerun_codeowners.yml) for an example).
It is recommended to also set up a rerun workflow on `pull_request_review` to rerun the check (see [.github/workflows/rerun_codeowners.yml](.github/workflows/rerun_codeowners.yml) for an example). Note that the rerun workflow's `check-names` must exactly match the job `name` in your codeowners workflow (`Run Codeowners Plus` above) — if they differ, reviews will silently stop triggering reruns.

**For advanced features to work, such as only re-requesting review when owned files are changed, you must disable this rule in branch protections:**
`Dismiss stale pull request approvals when new commits are pushed`
Expand Down
Loading