Skip to content

Commit f38ac5b

Browse files
committed
fix(sweep): allow PR review lease comments
1 parent 435a924 commit f38ac5b

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎.github/workflows/sweep.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1832,7 +1832,7 @@ jobs:
18321832
permission-checks: read
18331833
permission-contents: read
18341834
permission-issues: write
1835-
permission-pull-requests: read
1835+
permission-pull-requests: write
18361836
permission-statuses: read
18371837

18381838
- name: Create target Codex inspection token

‎test/sweep-workflow.test.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,6 +1596,19 @@ test("sweep target tokens fall back when an org app installation is missing", ()
15961596
assert.doesNotMatch(workflow, new RegExp("OPENCLAW_" + "GH_TOKEN"));
15971597
});
15981598

1599+
test("sweep target review token can post pull request review leases", () => {
1600+
const workflow = readText(".github/workflows/sweep.yml");
1601+
const targetReviewTokenBlocks = workflow
1602+
.split("- name: Create target review token")
1603+
.slice(1)
1604+
.map((block) => block.split("\n - ")[0]);
1605+
1606+
assert.equal(targetReviewTokenBlocks.length, 1);
1607+
const [targetReviewToken] = targetReviewTokenBlocks;
1608+
assert.match(targetReviewToken ?? "", /permission-issues: write/);
1609+
assert.match(targetReviewToken ?? "", /permission-pull-requests: write/);
1610+
});
1611+
15991612
test("proof nudge workflow is manual-first and scheduled behind repo vars", () => {
16001613
const sweepWorkflow = readText(".github/workflows/sweep.yml");
16011614
const workflow = readText(".github/workflows/proof-nudges.yml");

0 commit comments

Comments
 (0)