Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/junior-github/src/events/pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export type GitHubPullRequestEvent =
const GITHUB_PULL_REQUEST_EVENT_GUIDANCE: Partial<
Record<GitHubPullRequestEvent, string>
> = {
"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":
Expand Down
4 changes: 3 additions & 1 deletion packages/junior-github/tests/github-plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading