diff --git a/packages/junior-github/src/events/pull-request.ts b/packages/junior-github/src/events/pull-request.ts index d82f24b2e8..ca40ddf4de 100644 --- a/packages/junior-github/src/events/pull-request.ts +++ b/packages/junior-github/src/events/pull-request.ts @@ -29,6 +29,12 @@ export type GitHubPullRequestEvent = const GITHUB_PULL_REQUEST_EVENT_GUIDANCE: Partial< Record > = { + "pull_request.checks.failed": + "Fix only failures that the pull request causes. Do not skip, disable, or weaken a check to make it pass.", + // An approval with a body also arrives as review.commented in the same + // Turn, so this guidance must not tell the agent to hold off on that body. + "pull_request.review.approved": + "When the approval includes actionable feedback, address it like any other review feedback.", "pull_request.comment.created": 'After acting on actionable feedback, call github_updatePullRequestFeedback with the exact repo, commentId, and commentKind from Verified details, and status "addressed" or "declined".', "pull_request.review_comment.created": diff --git a/packages/junior-github/tests/github-plugin.test.ts b/packages/junior-github/tests/github-plugin.test.ts index dec14d08c4..c226227c3b 100644 --- a/packages/junior-github/tests/github-plugin.test.ts +++ b/packages/junior-github/tests/github-plugin.test.ts @@ -627,7 +627,9 @@ describe("github plugin", () => { expect(events?.events).toMatchObject({ "pull_request.checks.failed": { reach: { anyOf: ["repo"] }, - guidance: "Inspect the failed checks.", + guidance: expect.stringMatching( + /^Fix only failures .* Inspect the failed checks\.$/, + ), }, "pull_request.comment.created": { guidance: expect.stringContaining(