mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 09:43:30 +01:00
Running the nixpkgs-merge-bot in GitHub Actions instead of a separate
workflow has multiple advantages:
- A much better development workflow, with improved testability.
- The ability to label PRs with a "merge-bot eligible" label from the
same codebase.
- Using more data for merge strategy decisions, for example the number
of rebuilds.
This commits re-implements most of the features from the current
nxipkgs-merge-bot directly in the bot workflow. Instead of reacting to
webhook events, this now runs on the regular 10 minute schedule. Some
merges might be delayed a few minutes, but that should not be a problem
in practice.
To give the user early feedback, there are additional workflows running
when a comment or review is posted. These react with "eyes" to make the
user aware that the comment has been recognized.
The only feature not taken over was the size check for files in the PR.
This kind of check is not really relevant for maintainer merges only -
if we want to prevent bigger files from making it into the tree, then we
need a generic CI check, which is out of scope for the merge-bot.
Other than that, everything should be implemented - any omissions are by
accident.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| .editorconfig | ||
| .gitignore | ||
| .npmrc | ||
| bot.js | ||
| commits.js | ||
| get-teams.js | ||
| merge.js | ||
| package-lock.json | ||
| package.json | ||
| prepare.js | ||
| README.md | ||
| reviews.js | ||
| run | ||
| shell.nix | ||
| withRateLimit.js | ||
GitHub specific CI scripts
This folder contains actions/github-script-based JavaScript code.
It provides a nix-shell environment to run and test these actions locally.
To run any of the scripts locally:
- Enter
nix-shellin./ci/github-script. - Ensure
ghis authenticated.
Check commits
Run ./run commits OWNER REPO PR, where OWNER is your username or "NixOS", REPO is the name of your fork or "nixpkgs" and PR is the number of the pull request to check.
Labeler
Run ./run labels OWNER REPO, where OWNER is your username or "NixOS" and REPO the name of your fork or "nixpkgs".