Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: mark jobs as skipped instead of removing them #53

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nrdxp
Copy link
Contributor

@nrdxp nrdxp commented Sep 20, 2023

This allows a situation where a job is required for a PR merge to still pass if they are skipped as per the documentation here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks

BREAKING CHANGE: a new job conditional will be required

if: matrix.target.skipped == true

Otherwise the job will still run. This allows GitHub to properly update the status of the job without actually having to run it.

Draft Context

Unfortunately this doesn't work as is, but I have requested upstream the possibility of making the matrix context available in an if block:
https://github.com/orgs/community/discussions/37883#discussioncomment-7052195

This allows a situation where a job is required for a PR merge to still
pass if they are skipped as per the documentation here:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks

BREAKING CHANGE: a new job conditional will be required
```
if: matrix.target.skipped == true
```
Otherwise the job will still run. This allows GitHub to properly update
the status of the job without actually having to run it.
@nrdxp nrdxp marked this pull request as draft September 20, 2023 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant