Commit Graph

155 Commits

Author SHA1 Message Date
Michael Daniels
be22f9a507 Reapply {ci,workflows}: allow multiple blocking reviews"
A couple of bugfixes, but the problem was that the apps weren't installed.

(cherry picked from commit 1c3e149546)
2026-05-03 22:30:24 +00:00
Michael Daniels
797719cbd5 ci/github-script/merge: clarify maintainership is based on target branch
(cherry picked from commit bf5b890773)
2026-04-25 22:01:16 +00:00
Michael Daniels
dc02a812ce ci/github-script/manual-file-edits: init
Blocks manual edits to github-teams.json

(cherry picked from commit bd7e8b992b)
2026-04-17 01:37:26 +00:00
Kamil Monicz
3a18f893b9 ci/eval/compare: Expose attrdiff by kernel and platform
(cherry picked from commit 8926c73f50)
2026-04-13 15:05:58 +00:00
Michael Daniels
00812638b3 ci/github-script/merge: don't consider draft PRs eligible for merge bot
Fixes #499676

(cherry picked from commit 8c720affeb)
2026-03-14 21:19:54 +00:00
Michael Daniels
f468480986 ci/github-script/lint-commits: fix link to commit conventions
(cherry picked from commit 7d1f3b5df9)
2026-03-13 22:37:39 +00:00
Michael Daniels
6db2011fc9 ci/github-script/lint-commits: error when conventional commit format is used
E.g. https://redirect.github.com/NixOS/nixpkgs/pull/495442

(cherry picked from commit 58f002f950)
2026-03-12 22:13:44 +00:00
Michael Daniels
a6870d6871 ci/github-script: don't use GH API when getting commit info, return only subject
(cherry picked from commit d03b81d689)
2026-03-12 22:13:44 +00:00
Michael Daniels
de3d7652e0 ci/github-script: split getting commit details for PR into its own file
(cherry picked from commit 743ab29528)
2026-03-12 22:13:44 +00:00
Michael Daniels
ef2d0ea5df ci/github-script/merge: log when queuing/enabling merge
(cherry picked from commit a8fce8701c)
2026-03-11 04:05:18 +00:00
axodentally
bfe96e7c34 ci/github-script/merge: add more documentation links to bot's comment
(cherry picked from commit 86447ec024)
2026-03-09 14:40:55 +00:00
Emily
5bec687372 ci: get supported systems from the target branch
(cherry picked from commit fcb9bf6c05)
2026-03-01 21:23:12 +00:00
luojiyin
d338b02a71 fix: typo Enqueing -> Enqueuing in merge.js
(cherry picked from commit 7a91c688bc)
2026-03-01 13:35:10 +00:00
Michael Daniels
299bbe32b9 ci/github-script: add instructions for dependency updates
(cherry picked from commit 3a4282bc13)
2026-02-16 00:07:11 +00:00
Michael Daniels
b64488e43f ci/github-script: update dependencies, npm audit fix
`@actions/artifact` and `commander` now match the versions
used in `.github/workflows/bot.yml`.

(cherry picked from commit d70a72500c)
2026-02-16 00:07:11 +00:00
Michael Daniels
433440b6a6 ci/github-script/lint-commits: check for "fixup!" and friends
(cherry picked from commit 1921190502)
2026-02-14 18:59:57 +00:00
Michael Daniels
2d9351bc13 ci/github-script/lint-commits: support PRs with over 250 commits
We want to be able to check python-updates.

(cherry picked from commit c7eee1a755)
2026-02-14 18:59:57 +00:00
Michael Daniels
6801e9c840 ci/github-script/lint-commits: fix development branch check
https://redirect.github.com/NixOS/nixpkgs/pull/487628 should have had this
job fail, but [didn't](https://github.com/NixOS/nixpkgs/actions/runs/21753302803/job/62756645701?pr=487628#step:3:18),
because the head branch was named `master`.

(cherry picked from commit 0a07e4e187)
2026-02-08 02:22:12 +00:00
Silvan Mosberger
4d1ff1e51b ci: Fix team review requests from the bot
https://github.com/NixOS/nixpkgs/actions/runs/21782693200/job/62849125010
(cherry picked from commit 55faf59a25)
2026-02-07 16:43:26 +00:00
Silvan Mosberger
2de8472b15 ci/github-script/reviewers.js: Fix reviewer API request
It takes arrays, not sets, see https://github.com/NixOS/nixpkgs/actions/runs/21735690914/job/62700395870?pr=487491

(cherry picked from commit 71e704768d)
2026-02-07 11:09:38 -05:00
Silvan Mosberger
fa25c3a515 ci: First-class team package maintainer review requests
Co-Authored-By: Alexander Bantyev <alexander.bantyev@tweag.io>
(cherry picked from commit b0b2c24be9)
2026-02-07 11:09:38 -05:00
Michael Daniels
6315beae0c ci/github-script/check-target-branch: fix kernel exemption logic
Erroneously failed to exempt because I left out an if condition.

(cherry picked from commit e3f053a65d)
2026-02-07 00:20:40 +00:00
Michael Daniels
06ab464d08 ci/github-script/reviews: detect reviews belonging to commits.js
See comment, but TLDR this is for backwards-compatibility.

(See 479628, where it failed to dismiss after fixing.)

We don't bother with `prepare.js` because it always errors
(and so should never be dismissed).

I have simply added the needed comments to each of `check-target-branch.js`'s
pre-existing reviews, because there are so few.

(cherry picked from commit 7a74549a85)
2026-01-27 00:44:58 +00:00
Michael Daniels
c4a728596d ci/github-script/check-target-branch: do not "Request changes"
You can technically have multiple reviews requesting changes, but
there's no good way to dismiss all of the reviews requesting changes from
the same user using the UI.

This makes minimization impossible (because all but one of the reviews is not
dismissed, even though the PR is no longer blocked due to the review
in GitHub's system).

As a workaround, we will only comment.

CI will still fail when appropriate.

(cherry picked from commit c9225057c9)
2026-01-26 23:21:51 +00:00
Michael Daniels
8ef96bdbe0 ci/github-script/check-target-branch: kernel updates should not need to go to staging-xx.xx
(cherry picked from commit e1e5b8ad91)
2026-01-26 23:21:51 +00:00
Michael Daniels
1fb1e94ae1 ci/github-script/check-target-branch: loosen staging threshold for home-assistant
(cherry picked from commit cd6bc04a06)
2026-01-26 23:21:51 +00:00
Michael Daniels
2e33141358 ci/github-script/check-target-branch: simplify rebuildsAllTests variable
(cherry picked from commit 50590d21d5)
2026-01-26 23:21:51 +00:00
Michael Daniels
89ec5e11ce ci/github-script/check-target-branch: add type for changed-paths.json
(cherry picked from commit 99c1a35b73)
2026-01-26 23:21:51 +00:00
Michael Daniels
e6d05ec07a ci/github-script/{reviews,check-target-branch,commits,prepare}: add sticky review support
(cherry picked from commit 4447561c05)
2026-01-26 23:21:51 +00:00
Michael Daniels
b9712d47a3 ci/github-script/reviews: enable typescript
(cherry picked from commit 3fb23e6837)
2026-01-26 23:21:51 +00:00
Michael Daniels
d55bc207cc ci/github-script/bot: refine regexes
(cherry picked from commit 31876b4580)
2026-01-26 12:43:03 +00:00
Michael Daniels
685d3e87e9 ci/github-script/bot: only look at commit subject when deciding if a package is new/updated
(cherry picked from commit c717c98bc8)
2026-01-26 12:43:03 +00:00
Aliaksandr
a5020f4564 ci(bot): auto-label package updates with '8.has: package (update)'
Checks all PR commit messages for version update pattern
like 'packagename: X.Y.Z -> A.B.C'.

Matches: 1.2.3, 0-unstable-2024-01-15, 1.3rc1, alpha, unstable
(cherry picked from commit bf5645a0ed)
2026-01-25 20:41:45 +00:00
Aliaksandr
67bd22c24f ci(bot): auto-label new package PRs with '8.has: package (new)'
Checks all PR commit messages for ': init at' pattern and
requires eval to report added packages (attrdiff.added).

(cherry picked from commit bb0ec76b44)
2026-01-25 20:41:45 +00:00
Aliaksandr
6fea010dfe ci(bot): add fork compatibility for team lookups
Forks don't have NixOS teams, return empty list to avoid 404.

(cherry picked from commit 033eccc028)
2026-01-25 20:41:45 +00:00
Aliaksandr
b71f8fd349 ci(bot): add fork compatibility for maintainer map
In forks without merge-group history, return empty maintainer
map instead of throwing an error.

(cherry picked from commit 0557411308)
2026-01-25 20:41:45 +00:00
Philip Taron
bca1abdd5c ci/github-script/bot: handle deleted maintainer accounts gracefully
When a maintainer deletes their GitHub account, the bot would crash with a 404 error when trying to fetch their user info via `/user/{id}`.

This caused the scheduled bot workflow to fail repeatedly until manual intervention (e.g., closing/reopening the affected PR to clear the requested reviewer).

Fix by returning null from getUser() for 404 responses and filtering out null users when building the reviewers list.

(cherry picked from commit e6e6c544ae)
2026-01-20 22:18:51 +00:00
Emily
96194c7ebb Revert "ci/github-script/bot: skip mergeability checks temporarily"
Apparently any effects from this change haven’t shown up noticeably
in GitHub’s metrics, to the point where they’re not sure if it
was taking effect on the backend. Our contact is going to look at
getting something into the API response to help debug whether it’s
actually working or not, but agreed that we should just revert for
now. Since they have apparently reduced replica sync issues further
through other changes on their end, there shouldn’t be any urgent
need to make any changes here anyway.

This reverts commit 18b30c8ce1.

(cherry picked from commit 742b1081c5)
2026-01-20 16:35:32 +00:00
Michael Daniels
b2ab659b5e {workflows/eval,ci/github-script}: check for mass rebuilds targeting master/release-* branches
(cherry picked from commit a4d5f8a6b1)
2026-01-19 19:21:46 +00:00
Michael Daniels
db28b7e107 ci/github-script/reviews: allow leaving review comments
(cherry picked from commit 0ba1ea61e3)
2026-01-19 19:21:46 +00:00
Michael Daniels
082fdb45bf ci/github-script/reviews: rework dismissal/non-posting logic
Dismissals are done automatically by commits.js, even for reviews from
check-target-branches.js. This is not desirable.

The solution is
(1) do not decline to post a review because it was already dismissed
    (because it may have not been dismissed by a human, and circumstances may
    have changed), and
(2) reword the auto-dismissal message to not imply that whatever
    problems were present are fixed.

(cherry picked from commit e05e984689)
2026-01-19 19:21:46 +00:00
aleksana
1ecd8a1c54 workflows/lint: require to contain a colon with a whitespace
This restricts github automatically merging master with commit message
"Merge branch 'NixOS:master' into ...". Although we don't explicitly
prohibit not space after colons, we don't use it in any of the examples.
It's also enforced in https://www.conventionalcommits.org/en/v1.0.0/

(cherry picked from commit c04dc5869d)
2026-01-09 10:57:11 +00:00
Matt Sturgeon
1cb7760d47 workflows/lint: fully skip the commits job in Merge Queues
Follow-up to 7cf5972410

While the JS script already returned early, we can save a few resources
by skipping the job entirely when there's no `pull_request` context.

(cherry picked from commit 7cfe9b8c85)
2025-12-18 21:27:48 +00:00
Michael Daniels
081742aea5 {workflows/lint,ci/github-script}: lint commit messages
(cherry picked from commit 7cf5972410)
2025-12-18 12:54:07 +00:00
Emily
43b0f2cc95 ci/github-script/bot: skip mergeability checks temporarily
This is an experiment and can be reverted a few days from now; if
the results are positive on GitHub’s end, then we may want to make
the merge conflict checks run less frequently than the rest of the
labelling tasks.

(cherry picked from commit 18b30c8ce1)
2025-12-15 18:13:44 +00:00
Michael Daniels
4efc382873 ci/github-script/commits: clarify commit hash not found message
Per matrix.

(cherry picked from commit 3b4575c8c9)
2025-11-29 10:46:54 +00:00
Michael Daniels
74c008760e ci/github-script/bot: don't attempt to fetch pagination cursor if it's expired
I fixed this for the maintainer maps, but the artifact that was causing the
particular issue that prompted me to try to fix it was actually the
pagination cursor. So fix that too.

Related: #464046.
2025-11-22 15:36:38 -05:00
Michael Daniels
25b6c45ef4 ci/github-script/reviewers: convert all usernames to lowercase (part 2)
Context: #464046
2025-11-22 15:24:39 -05:00
Michael Daniels
a88711a02d ci/github-script/reviewers: convert all usernames to lowercase
Should fix https://github.com/nixos/nixpkgs/pull/463686#issuecomment-3563126753
2025-11-22 15:00:42 -05:00
Michael Daniels
040aeda1e7 ci/github-script/bot: log author of pull request
Should help debug "Review cannot be requested from pull request author."
in https://github.com/NixOS/nixpkgs/actions/runs/19591357890/job/56110301046#step:6:4726.
2025-11-22 11:54:25 -05:00