workflows/labels: various fixes (#418504)

authored by Wolfgang Walther and committed by GitHub 966bc95a 84b6f246

+20 -5
+18 -4
.github/workflows/labels.yml
··· 72 maxConcurrent: 1, 73 // Hourly limit is at 5000, but other jobs need some, too! 74 // https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api 75 - reservoir: 1000, 76 - reservoirRefreshAmount: 1000, 77 reservoirRefreshInterval: 60 * 60 * 1000 78 }) 79 // Pause between mutative requests ··· 152 status: prEventCondition ? 'in_progress' : 'success', 153 exclude_pull_requests: true, 154 head_sha: pull_request.head.sha 155 - })).data.workflow_runs[0]?.id 156 157 // Newer PRs might not have run Eval to completion, yet. We can skip them, because this 158 // job will be run as part of that Eval run anyway. ··· 186 187 // Get all currently set labels that we manage 188 const before = 189 - pull_request.labels.map(({ name }) => name) 190 .filter(name => 191 name.startsWith('10.rebuild') || 192 name == '11.by: package-maintainer' ||
··· 72 maxConcurrent: 1, 73 // Hourly limit is at 5000, but other jobs need some, too! 74 // https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api 75 + reservoir: 500, 76 + reservoirRefreshAmount: 500, 77 reservoirRefreshInterval: 60 * 60 * 1000 78 }) 79 // Pause between mutative requests ··· 152 status: prEventCondition ? 'in_progress' : 'success', 153 exclude_pull_requests: true, 154 head_sha: pull_request.head.sha 155 + })).data.workflow_runs[0]?.id ?? 156 + // TODO: Remove this after 2025-09-17, at which point all eval.yml artifacts will have expired. 157 + (await github.rest.actions.listWorkflowRuns({ 158 + ...context.repo, 159 + // In older PRs, we need eval.yml instead of pr.yml. 160 + workflow_id: 'eval.yml', 161 + event: 'pull_request_target', 162 + status: 'success', 163 + exclude_pull_requests: true, 164 + head_sha: pull_request.head.sha 165 + })).data.workflow_runs[0]?.id 166 167 // Newer PRs might not have run Eval to completion, yet. We can skip them, because this 168 // job will be run as part of that Eval run anyway. ··· 196 197 // Get all currently set labels that we manage 198 const before = 199 + (await github.paginate(github.rest.issues.listLabelsOnIssue, { 200 + ...context.repo, 201 + issue_number: pull_request.number 202 + })) 203 + .map(({ name }) => name) 204 .filter(name => 205 name.startsWith('10.rebuild') || 206 name == '11.by: package-maintainer' ||
+1
.github/workflows/pr.yml
··· 8 - .github/workflows/eval.yml 9 - .github/workflows/lint.yml 10 - .github/workflows/pr.yml 11 - .github/workflows/reviewers.yml # needs eval results from the same event type 12 pull_request_target: 13
··· 8 - .github/workflows/eval.yml 9 - .github/workflows/lint.yml 10 - .github/workflows/pr.yml 11 + - .github/workflows/labels.yml 12 - .github/workflows/reviewers.yml # needs eval results from the same event type 13 pull_request_target: 14
+1 -1
ci/eval/compare/default.nix
··· 100 (getLabels rebuildCountByKernel) 101 # Adds "10.rebuild-*-stdenv" label if the "stdenv" attribute was changed 102 ++ lib.mapAttrsToList (kernel: _: "10.rebuild-${kernel}-stdenv") ( 103 - lib.filterAttrs (_: kernelRebuilds: kernelRebuilds ? "stdenv") rebuildsByKernel 104 ) 105 # Adds the "11.by: package-maintainer" label if all of the packages directly 106 # changed are maintained by the PR's author. (https://github.com/NixOS/ofborg/blob/df400f44502d4a4a80fa283d33f2e55a4e43ee90/ofborg/src/tagger.rs#L83-L88)
··· 100 (getLabels rebuildCountByKernel) 101 # Adds "10.rebuild-*-stdenv" label if the "stdenv" attribute was changed 102 ++ lib.mapAttrsToList (kernel: _: "10.rebuild-${kernel}-stdenv") ( 103 + lib.filterAttrs (_: lib.elem "stdenv") rebuildsByKernel 104 ) 105 # Adds the "11.by: package-maintainer" label if all of the packages directly 106 # changed are maintained by the PR's author. (https://github.com/NixOS/ofborg/blob/df400f44502d4a4a80fa283d33f2e55a4e43ee90/ofborg/src/tagger.rs#L83-L88)