Skip to content

Commit d62abe2

Browse files
committed
ci(enforce-target): treat fork-head stacked PRs as valid
1 parent 4ec7d10 commit d62abe2

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/scripts/enforce-pr-target.test.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ describe("enforce-pr-target workflow", () => {
6565
assert.match(workflow, /stackedBase/);
6666
assert.match(workflow, /github\.rest\.pulls\.list/);
6767
assert.match(workflow, /treating as stacked/);
68+
assert.match(workflow, /other\.base\?\.repo\?\.owner/);
6869
const qualityCall = workflow.match(
6970
/collectPrQualityFailures\(\{([\s\S]*?)\}\);/,
7071
);

.github/workflows/enforce-pr-target.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ jobs:
299299
other =>
300300
other.number !== pull_number &&
301301
other.head?.ref === pr.base.ref &&
302-
(other.head?.repo?.owner?.login ?? owner) === baseOwner &&
303-
(other.head?.repo?.name ?? repo) === baseName
302+
(other.base?.repo?.owner?.login ?? owner) === baseOwner &&
303+
(other.base?.repo?.name ?? repo) === baseName
304304
);
305305
if (stackedBase) {
306306
core.info(

0 commit comments

Comments
 (0)