Open one auto-merging PR per package from every sync workflow
sync-upstream.yml, sync-rebuilds.yml and track-branches.yml each opened one batch PR, so one package with a failing build held back every other update in it (#788, #837). All three now group their changes with package-pr-groups.sh and hand them to package-prs.yml, which opens a PR per package and arms auto-merge. Packages pinned from the same upstream branch still share one. Green packages land on their own and only the failures stay open; a red PR conflicting with master, and each lane's old batch PR, get closed. sync-upstream.yml loses its human-merged lane: it now pushes with the PAT like the other two, so its builds start without an approval hold and its PRs auto-merge when green. min_release_age still quarantines fresh releases. Its approve job, approve-sync-push.cjs, and auto-merge-pr.cjs's exception for auto/sync-upstream go with it.
This commit is contained in:
1 parent
a7f730d1e6
commit
ba7561a34c
11 files changed
+424
-467
No files matched your search
@@ -14,9 +14,6 @@
|
||||
// test.yml runs on PRs only; an existing test may also run on master
|
||||
// (builder-images.yml runs tests/build-isolation.sh with packages: write),
|
||||
// so editing one still needs a maintainer.
|
||||
// - Not the upstream sync. It labels its own PR build-approved to release
|
||||
// GitHub's hold on its pushes, which is no one's approval; it stays on the
|
||||
// reviewed lane.
|
||||
const PACKAGES = 'pkgbuilds/';
|
||||
const TESTS = 'tests/';
|
||||
const TEST_WORKFLOW = '.github/workflows/test.yml';
|
||||
@@ -38,7 +35,6 @@ function packageChange(file) {
|
||||
if (file.filename === TEST_WORKFLOW) return file.status === 'modified' && onlyRunsTests(file.patch);
|
||||
return false;
|
||||
}
|
||||
const REVIEWED_BRANCHES = /^auto\/sync-upstream(\/|$)/;
|
||||
|
||||
function decide({ pr, files, vouchStatus, repository }) {
|
||||
if (pr.state !== 'open') return { enable: false, reason: 'PR is not open' };
|
||||
@@ -55,10 +51,6 @@ function decide({ pr, files, vouchStatus, repository }) {
|
||||
return { enable: false, reason: `author not trusted to build (${vouchStatus || 'missing'}${labelled ? ', labelled' : ''})` };
|
||||
}
|
||||
|
||||
if (pr.head.repo?.full_name === repository && REVIEWED_BRANCHES.test(pr.head.ref)) {
|
||||
return { enable: false, reason: `${pr.head.ref} stays on the reviewed lane` };
|
||||
}
|
||||
|
||||
if (!files.length) return { enable: false, reason: 'PR changes no files' };
|
||||
const outside = files.filter(file => !packageChange(file));
|
||||
if (outside.length) {
|
||||
|
||||
Reference in new issue
Block a user