Skip to content

Add and validate a dependent job for branch protection #234

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

Merged
merged 2 commits into from
Apr 25, 2025
Merged

Conversation

EliahKagan
Copy link
Owner

GitHub branch protection rules requiring CI checks currently only support listing individual checks as required.

This adds an all-pass job that depends on all other jobs, to simplify this. all-pass can thus be made a required check, in lieu of numerous others, which it takes care to ensure are treated as effectively required.

This also adds an all-pass-meta job that checks that the all-pass job really depends on all intended other jobs, which currently is all other jobs in the workflow. It is intentional at this time that neither CodeQL (configured via the "default" setup) nor the Markdown links check shall be blocking.

The all-pass job is based on the tests-pass job in gitoxide, introduced in GitoxideLabs/gitoxide#1551 by Jiahao XU (https://github.com/NobodyXu), moderately edited since, and further moderately edited in the form it appars here.

In view of...

  • (de minimis) the small size of the code, other than the list of jobs it depends on, which is not duplicated since the jobs here differ including in their names, and

  • how widespread that specific technique appears to be, based in part on searching GitHub and examining results with the exact string "contains(needs.*.result, 'cancelled')", and

  • (scènes à faire) the limited number of reasonable feasible ways the technique can be expressed

...it seems to me that that continued resemblance of fragments of the code here to the code there does not raise copyright or related problems, in the all-pass job.

Separately, the all-pass-meta job is is a direct copy of the check-blocking job in gitoxide, introduced among other changes in GitoxideLabs/gitoxide#1668. The all-pass-meta job is a near-complete copy of check-blocking, with only minimal changes, and even keeps the comments naerly unchanged. Although check-blocking is less important than tests-pass, it is also significantly longer and more complex.

But unlike tests-pass, I contributed the check-blocking job in gitoxide (without copying from a previous work to do so; and licensing it nonexclusively, with no transfer or assignment of copyright). So that specific code is fine for me to reuse here.

More broadly, I intend that anyone be allowed to reuse the code of the all-pass-meta job (as it appears here), anywhere, with no restrictions. See the 0BSD license file that accompanies this (algorithms-python) project.

Note that the code of check-blocking in gitoxide may receive modifications authored by others, may be renamed, and some other job may be renamed to it, or it might be removed and some other job with that name may arise later, etc. Such code may still only be used under the terms that it is offered; these more permissive terms do not apply to such code, especially if it is written by others.

GitHub branch protection rules requiring CI checks currently only
support listing individual checks as required.

This adds an `all-pass` job that depends on all other jobs, to
simplify this. `all-pass` can thus be made a required check, in
lieu of numerous others, which it takes care to ensure are treated
as effectively required.

This also adds an `all-pass-meta` job that checks that the
`all-pass` job really depends on all intended other jobs, which
currently is all other jobs in the workflow. It is intentional at
this time that neither CodeQL (configured via the "default" setup)
nor the Markdown links check shall be blocking.

The `all-pass` job is based on the `tests-pass` job in `gitoxide`,
introduced in GitoxideLabs/gitoxide#1551 by
Jiahao XU (https://github.com/NobodyXu), moderately edited since,
and further moderately edited in the form it appars here.

In view of...

- (de minimis) the small size of the code, other than the list of
  jobs it depends on, which is not duplicated since the jobs here
  differ including in their names, *and*

- how widespread that specific technique appears to be, based in
  part on searching GitHub and examining results with the exact
  string `"contains(needs.*.result, 'cancelled')"`, *and*

- (scènes à faire) the limited number of reasonable feasible ways
  the technique can be expressed

...it seems to me that that continued resemblance of fragments of
the code here to the code there does not raise copyright or related
problems, in the `all-pass` job.

Separately, the `all-pass-meta` job is is a direct copy of the
`check-blocking` job in `gitoxide`, introduced among other changes
in GitoxideLabs/gitoxide#1668. The
`all-pass-meta` job is a near-complete copy of `check-blocking`,
with only minimal changes, and even keeps the comments naerly
unchanged. Although `check-blocking` is less important than
`tests-pass`, it is also significantly longer and more complex.

But unlike `tests-pass`, I contributed the `check-blocking` job in
`gitoxide` (without copying from a previous work to do so; and
licensing it nonexclusively, with no transfer or assignment of
copyright). So that specific code is fine for me to reuse here.

More broadly, I intend that anyone be allowed to reuse the code of
the `all-pass-meta` job (as it appears here), anywhere, with no
restrictions. See the 0BSD license file that accompanies this
(algorithms-python) project.

Note that the code of `check-blocking` in `gitoxide` may receive
modifications authored by others, may be renamed, and some other
job may be renamed to it, or it might be removed and some other job
with that name may arise later, etc. Such code may still only be
used under the terms that it is offered; these more permissive
terms do *not* apply to such code, especially if it is written by
others.
This resolves a CodeQL check and is also just a good idea.

See GitoxideLabs/prodash#36.
@EliahKagan EliahKagan merged commit 47af094 into main Apr 25, 2025
44 checks passed
@EliahKagan EliahKagan deleted the ci-next branch April 25, 2025 02:47
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