Skip to content

Commit 5dae9e2

Browse files
committed
test(ci): pin default-branch trust for comment gate
1 parent 43479a0 commit 5dae9e2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎tests/zz-pr-coderabbit-readiness-revalidation.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ describe("CodeRabbit readiness revalidation", () => {
3030
expect(job?.if).toContain("github.event.issue.pull_request != null");
3131
expect(job?.if).toContain("github.event.comment.user.login == 'coderabbitai[bot]'");
3232

33+
const checkoutStep = job?.steps?.find(
34+
step => step.name === "Checkout trusted PR-quality scripts",
35+
);
36+
expect(checkoutStep?.with?.ref).toBe(
37+
"${{ github.event_name == 'issue_comment' && github.event.repository.default_branch || github.event.pull_request.base.sha }}",
38+
);
39+
3340
const gateStep = job?.steps?.find(
3441
step => step.name === "Enforce PR target, ancestry, and description",
3542
);

0 commit comments

Comments
 (0)