Files
nixpkgs/ci/github-script
Aliaksandr da97bf8423 ci/github-script/merge: skip auto-merge when CI has already failed
The merge bot falls back to GitHub Auto Merge whenever the merge queue
won't accept a PR yet. That is the right move while CI is still
running, but pointless once CI has already failed: Auto Merge can never
trigger, and fixing CI requires a new push, which invalidates the merge
command anyway (the bot only acts on comments after the latest push).

Fetch the `no PR failures` commit status and, when the merge-queue
enqueue fails, branch on it. If CI has already failed
(`error`/`failure`), skip Auto Merge and reply that a fresh
`@NixOS/nixpkgs-merge-bot merge` comment is needed once CI is green
again. Otherwise (pending or missing status) enable Auto Merge as
before.

`merge()` now returns `{ reaction, messages }` so the CI-failure path
can leave a thumbs-down reaction rather than the rocket used for an
actual merge.

Closes #512554.

Assisted-by: claude-code with claude-opus-4-8[1m]-high
2026-06-25 17:57:03 +03:00
..
2026-04-12 19:57:37 -04:00

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-shell in ./ci/github-script.
  • Ensure gh is 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".