Commit graph

12 commits

Author SHA1 Message Date
Wolfgang Walther d78de15627
workflows/bot: rename from labels
This workflow / script is already doing more than must labeling: it's
already auto-closing package request issues.

Since we're going to migrate the nixpkgs-merge-bot into this workflow,
we'll rename things to a more generic name.
2025-11-01 15:24:09 +01:00
Wolfgang Walther 3df31aa255
ci/github-script/teams: use consistent style
These are style-only changes, that are not enforced via tooling - but
used mostly consistently in the other github-script files.
2025-10-28 11:56:25 +01:00
Silvan Mosberger c0c6684257 workflows/team-sync: init
Creates a team sync workflow that pushes the current state of teams to a
JSON file, which can then be ingested by `lib.teams` to expose member
lists.

Co-Authored-By: Alexander Bantyev <alexander.bantyev@tweag.io>
2025-10-27 19:36:57 +01:00
Wolfgang Walther eb766e2d51
ci/github-script: fix run script
Not a problem for prepare/commits, but the labels comand will remove the
temp directory again, before it actually runs the command. Nothing good
will come out of that!
2025-08-26 13:52:25 +02:00
Wolfgang Walther 87d9b08ffb
ci/github-script/prepare: identify real base branch
When a contributor mistakenly sets the wrong target branch for a Pull
Request, this can lead to bad consequences for CI. Most prominent is the
mass ping of codeowners, that is already handled in
`ci/request-reviews/verify-base-branch.sh`. But there are other things
that go wrong:
- After eval, a mass ping of maintainers would still be possible, in
theory. Practically, this doesn't happen, because we have a limit of 10
reviewer requests at the same time.
- This will most often contain a change to `ci/pinned.json`, thus the
full Eval matrix of all Lix/Nix versions will be run, burning a lot of
resources.
- The PR will be labelled with almost all labels that are available.

We can improve on the current situation with some API calls to determine
the "best" merge-base for the current PR. We then consider this as the
"real base". If the current target is not the real base, we fail the
prepare step, which is early enough to prevent all other CI from
running.
2025-08-24 18:09:08 +02:00
Wolfgang Walther b6bbf7b250
workflows/check: always run commits job
This is the very first step to extending the commits job to do more than
just cherry-picks in the future: It could check reverts or merge
commits, but also the commit message format and more.

Of course, cherry-picks are still just checked on the stable branches as
before. For now, this allows us to run the part that dismisses automated
reviews automatically. This helps us when we do branch related checks in
the prepare step, which would also create such a review. To avoid
cluttering multiple reviews across a PR, we'll want all of these reviews
to be handled by the same code, thus this change.
2025-08-24 12:14:50 +02:00
Wolfgang Walther c787c66de6
ci/github-script/prepare: init from actions/get-merge-commit
This just moves the code over to ci/github-script to make it easy to
test and iterate on locally.

The name `prepare` is chosen, because the script will be extended with
the other steps from "PR / prepare" next.
2025-08-20 15:16:15 +02:00
Wolfgang Walther b46cb23251
ci/github-script/commits: init from ci/check-cherry-picks
This turns the check-cherry-pick script into a github-script based
JavaScript program. This makes it much easier to extend to check reverts
or merge commits later on.
2025-07-16 11:50:13 +02:00
Wolfgang Walther 2433050fb7
ci/github-script: use real @actions/core
This allows building markdown summaries, which is hard to mock.
2025-07-15 15:09:02 +02:00
Wolfgang Walther d71b8c3680
ci/github-script: allow running without dry mode 2025-07-14 13:49:41 +02:00
Wolfgang Walther 97d4103946
ci/github-script: allow running for single PR
Makes specific tests in the upstream repo easier to do.
2025-07-14 13:49:40 +02:00
Wolfgang Walther d11eba1e1d
ci/github-script: default to commonjs
Since all github-scripts need to be written in commonjs, we now default
to it by not setting package.json. Support from editors for .js files is
slightly better than .cjs. To still allow using module imports in the
test runner script, we trick node into loading the script itself as a
module again via `--import ./run`.
2025-07-14 10:35:18 +02:00
Renamed from ci/github-script/run.js (Browse further)