summaryrefslogtreecommitdiff
path: root/ci/github-script (follow)
Commit message (Expand)AuthorAgeFilesLines
* 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. Michael Daniels2026-01-261-1/+7
* ci: make reviews sticky; ci/github-script/check-target-branch: do not "Reques...Michael Daniels2026-01-264-58/+255
|\
| * 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. Michael Daniels2026-01-251-2/+2
| * ci/github-script/check-target-branch: kernel updates should not need to go to...Michael Daniels2026-01-251-2/+24
| * ci/github-script/check-target-branch: loosen staging threshold for home-assis...Michael Daniels2026-01-251-3/+13
| * ci/github-script/check-target-branch: simplify rebuildsAllTests variableMichael Daniels2026-01-251-1/+1
| * ci/github-script/check-target-branch: add type for changed-paths.jsonMichael Daniels2026-01-251-0/+13
| * ci/github-script/{reviews,check-target-branch,commits,prepare}: add sticky re...Michael Daniels2026-01-254-43/+177
| * ci/github-script/reviews: enable typescriptMichael Daniels2026-01-251-9/+27
* | ci/github-script/bot: refine regexesMichael Daniels2026-01-251-2/+3
* | ci/github-script/bot: only look at commit subject when deciding if a package ...Michael Daniels2026-01-251-3/+5
|/
* 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 Aliaksandr2026-01-241-0/+9
* 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). Aliaksandr2026-01-241-2/+21
* ci(bot): add fork compatibility for team lookups•••Forks don't have NixOS teams, return empty list to avoid 404. Aliaksandr2026-01-241-0/+5
* ci(bot): add fork compatibility for maintainer map•••In forks without merge-group history, return empty maintainer map instead of throwing an error. Aliaksandr2026-01-241-2/+14
* ci/github-script/bot: handle deleted maintainer accounts gracefully (#481949)Matt Sturgeon2026-01-202-3/+14
|\
| * 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. Philip Taron2026-01-202-3/+14
* | 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 18b30c8ce1eed9ff2e86128036b674e9e3796aaa. Emily2026-01-201-12/+0
* | {workflows/eval,ci/github-script}: check for mass rebuilds targeting master/r...Michael Daniels2026-01-192-0/+146
* | ci/github-script/reviews: allow leaving review commentsMichael Daniels2026-01-191-3/+23
* | 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. Michael Daniels2026-01-191-6/+3
|/
* 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/ aleksana2026-01-091-2/+3
* workflows/lint: fully skip the `commits` job in Merge Queues•••Follow-up to 7cf59724104ef43e73e96176acbb8a5be79b1921 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. Matt Sturgeon2025-12-181-2/+1
* {workflows/lint,ci/github-script}: lint commit messages (#470523)Matt Sturgeon2025-12-182-0/+101
|\
| * {workflows/lint,ci/github-script}: lint commit messagesMichael Daniels2025-12-132-0/+101
* | 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. Emily2025-12-151-0/+12
|/
* ci/github-script/commits: clarify commit hash not found message•••Per matrix. Michael Daniels2025-11-281-1/+1
* 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. Michael Daniels2025-11-221-1/+1
* ci/github-script/reviewers: convert all usernames to lowercase (part 2)•••Context: #464046 Michael Daniels2025-11-221-1/+3
* ci/github-script/reviewers: convert all usernames to lowercase•••Should fix https://github.com/nixos/nixpkgs/pull/463686#issuecomment-3563126753 Michael Daniels2025-11-221-5/+5
* 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. Michael Daniels2025-11-221-0/+2
* ci/github-script/bot: skip expired artifacts•••Should prevent "Unhandled error: HttpError: Artifact has expired", as was present in e.g. https://github.com/NixOS/nixpkgs/actions/runs/19594659032. Michael Daniels2025-11-221-1/+1
* ci/github-script/prepare: fix with missing release- branch•••The prepare script is currently failing for staging-25.11 PR's, because it assumes that a release-25.11 exists respectively. This is not the case in the transition phase before branch-off. We can fix this by always including the current target branch in the branches to check for, even if it's not a WIP branch. This means we might check some branches twice, but that's better than erroring out entirely when the branch is in fact correct. Wolfgang Walther2025-11-181-4/+1
* Revert "ci/github-script/labels: close empty PRs"•••This reverts commit 402b41c1257ffc7cb88f2876b5fa20ab3ffe4f95. GitHub' API repeatedly returns wrong data which causes closed PRs when the changes had not been merged, yet. We have closed a bit more than 100 PRs overall, most of them initially - the feature is not really that important overall. Wolfgang Walther2025-11-181-43/+0
* ci/github-script/bot: skip PR checks when stale•••It makes not much sense to run all the checks for PRs when we can already tell they are stale beforehand. In particular this should avoid creating ~3.3k temporary merge commits every day, for PRs that surely won't have had any change. The number of merge commits *could* play a role in the growing size of the fork network. We'll have GitHub look into the metrics before and after this change to see whether that is any improvement. Wolfgang Walther2025-11-171-18/+24
* ci: fix "needs: reviewer" label being removed after self reviewDiogo Correia2025-11-091-2/+6
* ci/github-script/bot: fix concurrency limit (#459207)Matt Sturgeon2025-11-061-1/+1
|\
| * ci/github-script/bot: fix concurrency limit•••This was introduced as part of the hotfix PR to avoid hitting API rate limits - but the condition was wrong. It was supposed to trigger in all PR contexts, not only for the Test workflow. Wolfgang Walther2025-11-061-1/+1
* | ci/github-script/merge: add hint about stuck GitHub (#459122)Wolfgang Walther2025-11-061-3/+10
|\ \ | |/ |/|
| * ci/github-script/merge: add hint about stuck GitHub•••Unfortunately it still happens frequently that, after enabling auto-merge, GitHub is stuck even though all checks have passed, and doesn't merge the PR. Any contributor can trigger GitHub again with an approval of the PR - this will then immediately queue the PR for merge. Adding a hint to the posted comment, should help users through this without my intervention. Wolfgang Walther2025-11-061-3/+10
* | ci/github-script/bot: limit concurrency in PR runs•••This lead to reaching secondary API limits in a treewide recently, so we better limit it to where we actually need it. Wolfgang Walther2025-11-061-1/+4
* | ci/github-script/reviewers: add TODO about future optimization•••We still use a few too many API requests by checking team members for collaborator status - we can improve on that in the future. Wolfgang Walther2025-11-061-0/+3
* | ci/github-script/reviewers: exit early for treewides•••When hitting a treewide, we would previously find the username for each user and then check all of them for collaborator status - only to then realize that this results in more than 15 reviewers and exit. We can put a simple stop-gap in, even before de-duplicating the combined lists of maintainers and owners as safe guard. We could still hit huge numbers of code owners, but in practice we don't nearly as many as maintainers, so this will be sufficient for now. Wolfgang Walther2025-11-061-17/+29
* | ci/github-script/merge: ignore PRs with >= 100 files•••We use the files endpoint to get a list of all *names* of files touched in the PR - but this endpoint will also actually download the files / their diff, too. That's pointless and actually takes quite some time for huge treewides. We're just putting in a stop-gap for now, so that we're not burning more than 1 API requests on this and don't spend so much time on it either. A limit of 99 files will be more than enough for quite some time - we will only need to raise this when we're able to represent package sets in by-name properly and have "package set maintainers", who are not committers. Wolfgang Walther2025-11-061-5/+14
* | ci/github-script/bot: fix needs reviewer label•••The recent change to use the result of requesting reviewers for setting the `needs: reviewer` label caused a regression: It would not set the label for PRs where no reviewers were requested, because *too many were eligible*. Still - these PRs don't have reviewers, so they need attention otherwise - via the label. Wolfgang Walther2025-11-061-9/+9
|/
* ci/github-script/bot: fix collaborator warning•••This was introduced shortly before merge of the reviewers.js file, but not actually tested - I thought it was not easy to find a PR triggering this warning. However, the scheduled run told me otherwise: The staging-next PR is the perfect candidate. Wolfgang Walther2025-11-061-1/+1
* ci/github-script/bot: fix scheduled bot with older artifacts•••We only recently introduced the owners.txt file to the comparison artifact, so once the bot runs on a schedule it will it older artifacts very quickly - and then can't find the owners file. We can fallback to an empty owners list in this case, because an older artifact also means an older workflow run previously, so this will have pinged owners already. Wolfgang Walther2025-11-061-4/+12
* ci/github-script/reviewers: improve "needs: reviewers" label•••This should fix the bug where the "needs: reviewer" label was set too early, just to be removed immediately, because reviewers were then requested. Wolfgang Walther2025-11-052-2/+13
* ci/github-script/bot: request reviewers•••This migrates the bash code to request reviewers to github-script. This will allow multiple nice improvements later on, but at this stage it's mostly a reduction in code and complexity. Wolfgang Walther2025-11-052-1/+146
* ci/github-script/bot: disregard bot and ghost approvals•••We technically counted bot approvals and approvals by deleted users for the approval labels as well. The former don't exist, yet, but if they were, I don't think we'd count them. The latter should arguably *not* be counted, because we can't tell anymore *who* approved, so we can't put any weight on it as reviewers. This simplifies the logic, too. Wolfgang Walther2025-11-051-12/+11