-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
GitHub Actions needed for in Nixpkgs #104594
Description
There is a lot of work we could automate or improve automation for. For some of these tasks we have ofBorg, and others are already done using GH Actions.
This ticket lists tasks we could automate and the type of bot we need for it. By using GitHub Actions it is hopefully easier to get more people that are interested involved.
Backport pull requests (PR)
Backporting is a hassle. To do it correctly, one should wait until the original PR is merged and then cherry-pick -x. This is demotivating for contributors, especially in case of trivial cherry picks. Thus, we need a bot that backports as much as trivially possible.
The Action should check for the 9.needs: port to stable, although likely we should change the label to explicitly say the branch or NixOS version. The label needs to be set by a nixpkgs-committer.
- https://github.com/marketplace/actions/backporting. Note, however, it seems to have trouble with forks and does not allow you to use custom label names.
Check backports have a valid hash (PR)
The rule when backporting is to use cherry-pick -x so the hash of the original commit being cherry-picked is included in the new commit in the line `cherry picked from commit``. Sometimes this is forgotten, and sometimes the hash is simply incorrect, because the original was rebased instead of merged or the commit contents was simply changed.
Set labels based on issue and PR title and text (Issue/PR)
Based on the title as well as the fields in an issue and PR, we can set a bunch of labels.
Set labels based on changed paths (PR)
Based on the paths that are changed by a PR, certain labels should be set. Note this is implemented currently by ofBorg https://github.com/NixOS/ofborg/blob/d39605727d9509826a61a4d38e18766a6a07277f/config.public.json#L116.
Comment on PR based on changed paths (PR)
Based on the paths that are changed by a PR, certain comments should be posted. An example are field-specific checklists.
- Changed files: https://github.com/marketplace/actions/get-changed-files
Invite maintainers to issue (Issue)
For the packages mentioned in the title and in the attributes field, invite the maintainers.
This requires an evaluation or at least a cache such as the packages-list file.
Merge master into staging branches daily
Mass-rebuilds should target staging and reach master via staging-next. To keep these two branches up to date, the master branch is merged into staging-next and then staging-next into staging. This is typically done daily and could be automated. Upon failure (merge conflict) a message is sent or issue opened.
Important is that these merges are not fast-forwards.
- https://github.com/marketplace/actions/merge-branch uses the GitHub API which does
--no-ff.
Extends #99722.