Skip to content

Latest commit

 

History

History
349 lines (298 loc) · 31.7 KB

github-prs.md

File metadata and controls

349 lines (298 loc) · 31.7 KB

GitHub PRs

PR links on GitHub and GitHub Enterprise show their live state on the card (open, draft, merged, closed, checks, review, conflicts), and problems surface under Needs attention. A task in Review can merge its PR, or turn on auto-merge, from the board. The board calls GitHub's GraphQL API with the token the user's gh CLI holds, so it needs no token of its own (ADR 0006). GitHub is one git host kind behind the GitHost interface and the GitHosts registry (ADR 0014): the poller, the merges and Autopilot are host-neutral and reach GitHub only through it.

How it works

Links

link (MCP) or Add link (panel) classifies a value (packages/contracts/src/links.ts). Any https://<host>/<owner>/<repo>/pull/<n> URL becomes a pr link with ref = {host, repo, number}, so Enterprise PRs parse like github.com ones. Azure DevOps and Bitbucket PR URLs are pr links with no ref: shown, never polled.

Migration 008_enterprise_pr_links (a code migration in db/codeMigrations.ts, since SQLite can't parse URLs) gave a ref to links stored before this, as plain URLs or ref-less PRs.

Hosts and sign-in

  • The poller only asks hosts a git host kind serves (GitHosts.forHost, integrations/gitHosts.ts). For GitHub that is github.com, *.ghe.com, a host with a github DNS label (github.example.com; GITHUB_HOST.claimsHost in packages/contracts/src/gitHosts.ts), or any host gh is signed in to. A link to /a/b/pull/1 on some other site is never sent anywhere.
  • And only hosts gh is signed in to, since that's where its token is sent. gh auth status --json hosts and gh --version are read every 10 minutes (githubStatus.ts) and shown in Settings: the CLI and its version, then each host and its account. GET /api/integrations/status returns them as gitHosts, one GitHostStatus per kind. A gh too old for --json falls back to the exit code of gh auth status, which can't name hosts, so only github.com is used then.
  • The token is gh auth token --hostname <host>, kept in memory for five minutes (githubApi.ts). A 401 on a cached token asks gh once more before failing.
  • A used-up rate limit isn't being signed out. gh auth status checks a login by calling the API, so when the account's limit has run out it calls the token invalid (HTTP 403: API rate limit exceeded). parseGhAuthStatus marks such a host rateLimited, and createGhStatus confirms it with gh api rate_limit --hostname <host>. That call doesn't count against the limit, and only a token the host accepts gets an answer. Once confirmed, the host stays signed in (its token may still go there) with GitHostAccount.rateLimit = { resource, resetAt }. If the call fails, the host is signed out as before. The status is read again once the reset has passed. requireSignedIn doesn't refuse the host for it: it hands the limit to githubRateLimits (core → rest, graphql → graphql; other resources aren't seeded), so only the requests that spend that limit are refused, with "GitHub API rate limit reached on github.com, resets at HH:MM" rather than "run gh auth login" (see Rate limits below). REST and GraphQL count separately, and nearly every action (reviews, merges, threads, the poll) spends GraphQL, so a used-up core holds only the REST reads (milestones, branch rules, compares). gh repo create, which runs outside the API client, checks exhausted(host, "graphql") itself, as gh makes the repo over GraphQL. Settings → Integrations shows the host as signed in with a Rate limited badge, which limit it is and the reset time, without a sign-in hint.

Rate limits

apps/server/src/integrations/githubRateLimits.ts reads the x-ratelimit-limit/remaining/used/reset/resource headers of every answer to the board's own requests, per host and resource (REST spends core, the poll spends graphql):

  • Who spent it. The board counts its own calls in each window. When an answer shows a limit used up, it logs once: [github] core limit used up on github.com (5000/5000, resets 19:54); the board made 212 of those calls. The first number is GitHub's own count for the account, so what the board didn't make came from elsewhere, usually agents' own gh.
  • Not sending what would be refused. Until a used-up limit resets, createGithubApi refuses requests that spend it on the spot (GithubApiError rate_limited, with resetAt), rather than send another call GitHub would only refuse. A secondary limit's retry-after holds requests back the same way.
  • Easing off. Below a tenth of the poll's limit left (LOW_WATER, GitHost.pollBudgetLow), the poller reads only hot PRs until the reset, and logs once that it is doing so.
  • A rate-limit failure carries when the limit resets (GitHostError.resetAt, from retry-after or x-ratelimit-reset), and wrappers keep it (toAppError). rateLimitOf(error) finds it, which is how Autopilot defers the run to the reset rather than fail it (autopilot.md).

Polling

apps/server/src/integrations/prPoller.ts, which reads each batch with the host's readSnapshots (GitHub's GraphQL query and mapping are githubSnapshot.ts):

  • A task a connected machine holds and whose machine runs Autopilot isn't polled by the board (polledElsewhere): the machine polls its PRs with its own gh login, reviews, fixes and merges them, and its log carries the snapshots it read, so the card shows the same thing. One writer, so a merged PR moves the task once and notifies once (remote machines).

  • A tick every 20 seconds picks the pr links that are due (prIsDue, integrations/prPolling.ts), groups them by host and repo, and reads each group with one aliased query (pollQuery: pr0, pr1, … with numbers as variables), at most 25 PRs a query and 4 queries at a time. A link is due once its tier's interval has passed since syncedAt (a little early, so a tick doesn't just miss it). Each cycle that sends queries logs how many PRs and queries it used (debug).

  • Tiers (prTier), by how likely the PR is to change:

    Tier Every PRs
    hot 20 s never read; checks pending or optional checks running; linked or updated on GitHub (updatedAt) in the last 10 minutes; its task's panel is open
    warm 2 min other open and draft PRs
    cold 30 min merged and closed PRs, whoever is looking
  • Right away. A PR link added over REST or MCP is read at once (prLinked → pollLink, which honours Poll PR status). When a task panel opens, and every 20 s while it stays open and visible, the web calls POST /api/tasks/:id/view (useTaskView): the server reads the task's PR links that were last read more than 15 s ago and treats the task as open for 40 s, so its PRs are hot even if they're otherwise warm.

  • Back-off. A PR GitHub can't find, or a host that answered with a rate limit or a refused token, is left alone for the warm interval (2 minutes) rather than asked again every tick.

  • A PR GitHub can't find comes back as an error on its alias; the rest of the batch is stored, and the error is logged once per link. A rate limit or a refused token stops that host for the rest of the poll and is logged once per host.

  • Skipped when Poll PR status is off in Settings, or gh is missing or signed out everywhere.

  • Refresh on a link (POST /api/links/:id/refresh) reads it now and reports why it can't (gh missing, not signed in to that host, GitHub's error). The PR row in the task panel has it as an always-visible icon beside "checked 23s ago" (checkedAgoLabel, from the link's syncedAt).

The snapshot

mapPrSnapshot turns a PR and its repository into a PrSnapshot:

Field Values
state merged, closed, draft, open
checks From the head commit's status check rollup, counting only the checks the base branch requires for this PR (isRequired(pullRequestNumber:)), as GitHub's merge box does; with none required, every check counts. Only each check's newest run counts (the rollup also lists runs a newer one replaced, e.g. cancelled by cancel-in-progress or re-triggered by a PR edit): a check is its name within its workflow (or within its app, for runs outside a workflow), and the highest run databaseId wins; runs without a name and status contexts are kept as they are. failing if one failed, errored, timed out, was cancelled or needs action; else pending if one is running or expected; else passing; none without checks
optionalChecks When some checks are required: how many of the others are pending and failing, so an optional workflow that is still queued doesn't hold checks at pending. Absent when there are none
mergeState GitHub's mergeStateStatus, lowercased (clean, unstable, has_hooks, blocked, behind, dirty, draft, unknown)
reviewDecision approved, changes_requested, review_required, or none
mergeable mergeable, conflicting, unknown
autoMerge The method auto-merge will use, or null when it's off
mergeMethods The repo's allowed methods (merge, squash, rebase)
autoMergeAllowed Whether the repo allows auto-merge
canMerge The signed-in account has WRITE, MAINTAIN or ADMIN on the repo
headOid The head commit, checked again before merging
isCrossRepository Whether the head branch is in a fork; Autopilot's PR review skips those
reviews The last 20 submitted reviews, oldest first: id (databaseId), author, state, submittedAt, own (viewerDidAuthor), trusted, hasBody (it has a summary: a reply on a thread is an empty commented review), marked (its first line carries Autopilot's or a fix session's mark, isAutopilotMarked) and commitOid (the head it was submitted on)
reviewComments Comments on the last 30 review threads that aren't resolved and that the signed-in account didn't answer last (the last 5 of each), oldest first: id, author, createdAt, reviewId, own, trusted
reviewThreads Those threads that aren't resolved: id (node id), canResolve, lastCommentId, ownLast, lastReviewId, lastAuthor and lastTrusted (the newest comment, whether it is the signed-in account's, the review it is in, who wrote it, "" for a deleted account, and whether they are trusted). unansweredThreads (contracts) lists the ones whose newest comment isn't the account's, counting Fix PRs' trusted bots as trusted; get_task's PR line shows them, isStalledPr reads them, and approvalBlock says why an approval is missing
unresolvedThreads How many of the threads read aren't resolved
conversationComments The last 10 comments on the PR's conversation (not inline ones), oldest first: id, author, createdAt, own, trusted, marked
headCommittedAt When the head commit was committed: a conversation comment after it hasn't been answered by a push

trusted means the author is an OWNER, MEMBER or COLLABORATOR of the repository. The poll reads one comments connection per thread, and one for the conversation: each connection is a request in GitHub's rate-limit cost, and the poll reads up to 25 PRs every 20 seconds. It reads the bodies of reviews and conversation comments only to set hasBody and marked, and never keeps them; it reads no thread bodies. Bodies cost no rate-limit points, only download: measured on this repository's PRs, one PR costs 1 point before and after, ten cost 3 before and 4 after, and 25 cost 9 either way, while the answer for 25 grew from about 43 KB to 141 KB, mostly long review summaries. What resolving a thread needs (its first comment, its newest comment's body to match Autopilot's marked reply with parseAutopilotReply, the PR's newest 100 commits) is read fresh by reviewThreads(ref) (ReviewThreadDetail), only when there is a thread to look at, and never goes into a prompt.

optionalChecks, mergeState and the last twelve are optional, so snapshots stored by the old gh pr view poller still parse (and offer no merge until the next poll). links.setSnapshot stores the snapshot, and publishes the card only when it changed.

Reviews by Autopilot

The poller's snapshot (state, headRef, headOid, isCrossRepository) is what the Review PRs automation reads: it reviews an open (or, if asked, draft) PR once per head commit. The reviewer reads the PR (its overview, files, paged diff and comments) through the board's run tools, which read GitHub's REST API with the same gh token through GitHost (integrations/githubReads.ts); it has no gh of its own. postReview posts the result with the gh token as one review with event: COMMENT (addPullRequestReview), after checking the PR's live head is the commit that was reviewed; inline comments GitHub refuses (a line outside the diff) go into the body. When GitHub answers a post with an error, postReview looks for the review among the account's own at that head (findPostedReview, starting with the review header) before reporting the failure, so a review that landed counts as posted. Its errors read "GitHub couldn't post the review: …" and keep their reason (GitHostError), which isTransientHostError (also used by the epic merge) reads to tell what is worth another try. Autopilot reaches all of this through ctx.gitHosts (gitHostActions), which sends each call to the host the PR is on. See Autopilot.

Fix PRs reads checks, mergeable, reviewDecision, reviews, reviewComments, conversationComments and headCommittedAt to decide when a PR needs fixing. Autopilot posts under the same login, so it leaves out what own marks, except the user's own words in summaries and conversation comments, which marked tells from Autopilot's. It reads reviewThreads to find threads the account answered last, then reviewThreads(ref) and resolveReviewThread to resolve the ones it replied it fixed; Review PRs resolves its own threads a later round confirms fixed the same way.

A repository can require every conversation resolved before a merge. When GitHub says the PR is blocked and it has unresolved threads, the merge gate and the refusal at merge time say "N unresolved review conversations", apart from a missing approval.

When the approval is what's missing, the threads are often why: a reviewer bot won't approve while its points are open. approvalBlock (contracts, prThreads.ts) reads reviewThreads of an open PR whose reviewDecision is review_required and splits them into waiting on a reply (the newest comment is someone else's) and answered, waiting on the reviewer (ownLast: Autopilot or the user replied), naming who spoke last on the waiting ones, three then "and N more". approvalBlockReason puts it in words, and every place uses it: merge_task_pr's refusal ("it still needs an approving review, and 2 unresolved review threads (@coderabbitai) may be holding it back: 1 waiting on a reply, 1 answered and waiting on the reviewer"), get_task's PR line (which adds ", N answered review threads waiting on the reviewer" after the unanswered ones), and the card's PR chip tooltip and the panel's PR row (board-layout.md). A snapshot from before the threads were read gives only the count.

Attention

An open or draft PR puts the task under Needs attention when checks fail (error), changes are requested, or it conflicts (warnings). "Checks fail" is the checks verdict, so a failing optional check (optionalChecks) doesn't raise it when others are required; nor does it hold back Autopilot's merges or start Fix PRs. Merged and closed PRs never do. The user can dismiss each of the three; a dismissed one comes back when the PR's head commit changes.

Merging

prMergeAction(taskStatus, snapshot) in packages/contracts/src/merge.ts picks the control, the same order as T3 Code's PR panel. Only a task in Review whose PR the account can merge gets one:

  1. merged, closed or draft: none;
  2. conflicting: none;
  3. auto-merge on: an Auto-merge on badge, and Disable auto-merge in the link's menu;
  4. checks not passing, and the repo allows auto-merge: Enable auto-merge;
  5. otherwise: Merge.

The panel's PR row shows the button; the card shows a merge icon next to the PR chip. While the PR has something to fix the slot is Fix in → instead, and Merge is in the row's menu (below). Both open MergePrDialog, where the method can be changed. It offers the method last picked for the repo (useMergeMethods, in local storage), else squash, merge, rebase, whichever the repo allows. A rebase of an integration epic's branch (epic/…) isn't remembered (rememberMergeMethod): it lands the task PRs' commits one by one (GitHub setup), and offering it next would do that to an ordinary PR.

POST /api/links/:id/merge with {action: "merge" | "auto" | "disable_auto", method}:

  • Refused before reaching GitHub when the task isn't in Review, the link has no snapshot, the account can't merge, or the repo doesn't allow the method.
  • Reads the PR fresh: node id, head, mergeStateStatus, isMergeQueueEnabled. If the head moved since the snapshot, it stops with a conflict and refreshes the link, so the user sees the new commits before merging them.
  • Then mergePullRequest with expectedHeadOid, or enablePullRequestAutoMerge when a merge queue is on or auto-merge was asked for and the PR can't merge right away (anything but CLEAN, HAS_HOOKS, UNSTABLE). disable_auto calls disablePullRequestAutoMerge.
  • GitHub's error is shown as is. The branch is never deleted by the board; the repo may delete it on merge.
  • Then the link is refreshed. A merged PR then finishes the task the usual way (below).

Merging is UI only, with one exception for agents: merge_task_pr.

This repo's own main requires green checks but no approval (GitHub setup), so a green PR is CLEAN and the board can merge it. A required review would leave it BLOCKED until someone else approves.

merge_task_pr

The MCP tool merge_task_pr(task, method?) lets an agent (the orchestrator of an epic, say) merge a task's PR into the default branch, for tasks the user allowed to be merged that way (ADR 0008). Autopilot's Merge ready PRs, with Into main on, merges through the same mergeTaskPr (with expectedHeadOid, so only at the head it checked), one PR at a time per repository (Autopilot). The rules below are autoMergeVerdict, which both share.

  • The flag. tasks.auto_merge: null (Default) and 0 (Off) refuse, 1 (On) allows. Set in the REST task update (autoMerge) or by an agent with create_task / add_to_backlog / update_task (autoMerge: "default" | "on" | "off"), only once the user has said so. The server can't tell an agent from the user, so an agent could set On unasked; it is trusted like the Autopilot flag, and the gate below limits the harm (ADR 0008). Epics can't have it. The task detail shows Auto-merge: when set, and the task panel's Autopilot section sets it (the merge it chip).
  • Refused (a VALIDATION error with the reason, autoMergeVerdict and mergeTaskPr in integrations/mergeTaskPr.ts) for an epic, a task without the flag On, a task in an epic delivered through an integration branch (Autopilot merges those), a task with no PR, or more than one, not merged or closed, a PR from a fork, and whenever notMergeable (Autopilot's gate) gives a reason: not in Review, PR not open or a draft, local review going or blocking/major findings open, a Review PRs or Fix PRs run going, Review PRs (when on) not clean at the head, changes requested, checks not passing (or none for 10 minutes), not cleanly mergeable, GitHub saying it is blocked (a required check not reported yet) unless only a review is missing. Also when an approving review is still required (with the unresolved threads that may be why, approvalBlockReason), the account can't merge, or the repo doesn't allow the method asked for.
  • Merging. mergeIntoDefaultBranch (integrations/prMerge.ts) reads the PR fresh with the host's mergeTarget, runs checkAutopilotMergeTarget with into: "default" (the base must be GitHub's default branch, and still the one the snapshot showed), stops with a CONFLICT and refreshes the link if the head moved, refuses unless GitHub's mergeStateStatus is CLEAN, HAS_HOOKS or UNSTABLE (so an admin's account never merges past a branch rule such as a required approval), then calls mergePullRequest with expectedHeadOid and the method (asked for, else pickMergeMethod's squash, merge, rebase). The link is refreshed, which finishes the task (below); if the refresh failed the tool moves it to Done itself. It notes the merge on the task.

Fixing a PR by hand

Board task: #78. The PR row has one action slot (prRowSlot in packages/contracts/src/prFix.ts), in the panel and on the card. prProblems(snapshot) says what is wrong: failing checks, a conflict, changes requested; and only for an open or draft PR in the base repository (isCrossRepository is false) with a headRef and headOid, as Fix PRs does.

The PR has The slot (panel row; card chip) In the row's ⌄ menu (the card chip's menu)
nothing to fix Merge, as above (prMergeAction)
a problem Fix in → (a menu: the targets below) the Merge or Enable auto-merge that gave way
a problem, Fix PRs on for the task, running Autopilot is fixing Fix in →, and that Merge
a problem, Fix PRs on for the task, gave up Autopilot gave up Fix in →, and that Merge

No Fix in → on a Done task (Autopilot skips them too), an epic (its sessions start from its tasks) or a link with no repository and number. Fix PRs on for the task is its resolution at the task's epic, project or board (useAutopilotScope, useAutopilotEpicScope), read only while the PR has a problem. Running is a fix_prs run for this link (fixRunKeyPrefix, from the task's runs) that is queued or running, or that handed the fix to a T3 thread, a new one or a nudge into the task's own, which is still working: those runs end at once, so t3RunWorking (shared with Fix PRs, in packages/contracts/src/runThreads.ts) reads the thread. Gave up is the task's Needs attention reason fixGaveUpPrefix(n). The board can't tell "Autopilot is about to fix it" from "Autopilot has done all it will" without redoing the automation's check in the browser, so in those states Fix in → stays the primary action.

Fix in → offers T3 Code thread… (as in the hand-off menu), Claude Code session… and Copilot CLI session…, each opening its launch dialog with fixLinkId set (useDialogs().openT3Launch(taskId, fixLinkId), openSessionLaunch(taskId, harness, fixLinkId)), and Copy fix prompt. The dialogs read GET /api/links/:id/fix:

  • manualFix (autopilot/automations/fixPrs.ts) builds Fix PRs' prompt (fixPrompt with manual: true) for every problem the PR has now, whoever raised it and whether or not Autopilot has tried it. Review comments and Autopilot's own review aren't listed: the user points the agent at those. Changes requested read the newest trusted review, or tell the agent to find it with gh pr view --comments when there is none. The scope's Fix skill is followed, as for Autopilot's attempts. The response also carries the PR's branch, headOid, number and problems. It is a 400 for a PR with nothing to fix, as prProblems says.
  • The prompt differs from Autopilot's for a user who is watching: no "Autopilot sent you" or attempt count, the agent may ask instead of stopping, replies carry no Autopilot marker (the reply file is fix-reply.md), the agent is told the board linked the session, and the push is git push origin HEAD:<branch> since the worktree's own branch is a new one. The safety rules are the same: never force-push, never push to the default branch, never merge, conflicts by merge.
  • CLI sessions use the workspace {mode: "pr_branch", branch} (agent sessions): a worktree on origin's copy of the PR's branch, like Fix PRs' headless runs. The dialog has no "where" choice and needs a git repository. The session is labelled "Fixing the PR of #N" and linked to the task.
  • Fix PRs doesn't know about these sessions. Its check defers only to its own runs and to the T3 threads they started (t3RunWorking). If a session you started pushes and the checks fail again at the new head while Fix PRs is on, it may start an attempt of its own on the same branch. Turn Fix PRs off for the task, or Pause all, while you work by hand.
  • T3 threads start in a new worktree from origin/<branch> (the dialog's initial choice, as for an integration epic's branch). The dialog never starts a fix in your checkout or an existing worktree (the launch is blocked), since the prompt has the agent fast-forward its branch to the PR's when the worktree lacks the head commit. It warns when T3 lists no ref for the PR's branch (the worktree then starts from the default branch). The thread is linked to the task.

Finishing on merge

When a task in Review has every polled PR finished and at least one merged, it moves to Done as actor github. This happens when a poll (or a merge) sees the last PR finish, and when a task enters Review with its PRs already finished. PRs that aren't polled and were never fetched (other sites, or GitHub hosts gh isn't signed in to) never hold it back, except on github.com, which always counts (holdsTasks): while gh's status is still unknown, one merge mustn't finish a task whose other PR is open.

Decisions

  • GraphQL with gh's token, not gh pr view. Batching, Enterprise hosts and merging with an expected head need the API. See ADR 0006.
  • No token setting. The board uses whichever account gh is signed in with per host. Supporting a pasted token would mean storing one.
  • Merge only from Review. A task gets merged once its work is done and reviewed; offering it earlier would skip the plan and the local review.
  • Always confirm. A merge can't be undone from the board, so every merge goes through the dialog, from the card too.
  • No branch deletion. GitHub's repo setting can delete branches on merge; the board doesn't add its own.
  • Other hosts are links only. Azure DevOps and Bitbucket PRs are recognised so they show as PRs, but aren't polled.

Code map

File What it does
apps/server/src/integrations/githubApi.ts API URLs, gh tokens, auth status, GraphQL with error and rate-limit handling
apps/server/src/integrations/gitHost.ts, gitHosts.ts The GitHost interface, GitHostError, the registry and Autopilot's actions
apps/server/src/integrations/prPoller.ts Polling, back-off, viewTask, pollLink, refresh
apps/server/src/integrations/prMerge.ts The panel merge, the epic and default-branch merges and their guards
apps/server/src/integrations/githubHost.ts GitHub's GitHost: merges, reviews, threads, epic PRs, agentHints
apps/server/src/integrations/githubSnapshot.ts pollQuery, mapPrSnapshot, each check's newest run
apps/server/src/integrations/githubStatus.ts gh --version and gh auth status, a rate-limited login confirmed with gh api rate_limit
apps/server/src/integrations/githubRateLimits.ts The rate-limit headers per host and resource, the board's share, the low-water mark
packages/contracts/src/gitHosts.ts Host kind definitions (GITHUB_HOST) and GitHostStatus
apps/server/src/integrations/prPolling.ts prTier, prIsDue: how often each PR is read
apps/server/src/integrations/gh.ts Running gh
apps/server/src/integrations/index.ts Starts the integrations, refreshLink, mergePr, mergeTaskPr
apps/server/src/integrations/mergeTaskPr.ts merge_task_pr's checks and merge into the default branch
apps/server/src/autopilot/mergeGate.ts notMergeable, the gate shared with Merge ready PRs
apps/server/src/mcp/tools/merge.ts The merge_task_pr tool
apps/server/src/services/links.ts Adding links, setSnapshot, completeOnMerge
apps/server/src/db/codeMigrations.ts Re-classifying stored PR links
apps/server/src/test/fakeGithub.ts Fake gh and GraphQL API, and createGithubStack, for tests
packages/contracts/src/links.ts URL and key classification
packages/contracts/src/merge.ts prMergeAction, pickMergeMethod, MergePrInput
packages/contracts/src/derive.ts deriveAttention
apps/web/src/components/board/CardLinks.tsx, task/LinksSection.tsx PR chips and merge controls on the card and in the panel
apps/web/src/components/merge/MergePrDialog.tsx The merge dialog
packages/contracts/src/prFix.ts prProblems, prRowSlot, PrFixInfo
apps/web/src/components/handoff/FixPrMenu.tsx The slot hook (usePrSlot) and the Fix in → menu items
apps/web/src/components/handoff/fixPr.logic.ts prAutopilotState: Fix PRs' state for the slot
apps/server/src/autopilot/automations/fixPrs.ts manualFix and fixPrompt, which Fix PRs and Fix in → share
apps/web/src/components/settings/IntegrationsSections.tsx The GitHub section in Settings → Integrations