Skip to content

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.

2 participants