Autopilot
Hand a pull request to HeyDeer. Autopilot fixes what’s open, pushes to the PR’s branch and reviews each change until the PR is ready to merge or needs you.
Requirements
- The pull request is open, and its branch is in the same repository, not from a fork.
- You have write access to the repository, and the Who can request reviews setting includes you.
- The workspace is on a paid plan. See Plans.
- HeyDeer has read and write access to Contents and Pull requests. See GitHub App and permissions.
Start and stop Autopilot
To start Autopilot, use any of these:
- Select Autopilot on the review page in HeyDeer, then Start Autopilot.
- Select the Autopilot button in HeyDeer’s review comment on GitHub, then Start Autopilot in HeyDeer.
- Comment
@heydeer autopiloton the PR.
To stop it, select Stop Autopilot on its page in HeyDeer or comment @heydeer autopilot stop. Starting Autopilot again resets the round count and picks up new answers and comments.
While Autopilot runs, you can’t start a fix or request a review on the PR; stop Autopilot first. Autopilot can’t start while a fix is running.
What Autopilot fixes
| Item | What counts |
|---|---|
| Findings | Findings within the repository’s feedback scope and HeyDeer’s earlier concerns that are still open, as the HeyDeer Review check counts them. |
| Requests | Unresolved review conversations a person started where someone with write access wrote last, and comments and review bodies they posted on the PR after the review Autopilot started from. While Autopilot runs, mentioning @heydeer on the PR, also in HeyDeer’s own review conversations, asks Autopilot instead of starting a separate request. |
| Failing checks | Required checks when your branch rules name them; otherwise every check except HeyDeer Review. |
| Merge conflicts | HeyDeer merges the base branch and resolves the conflicts. It never rebases or force-pushes, and doesn’t update a branch only because it’s behind. |
Autopilot ignores comments from bots and from people without write access. HeyDeer replies in each conversation it addressed, and asks there when a request needs a decision from a person.
HeyDeer reads each failing check’s title, summary and annotations and, for a GitHub Actions job, the log of the failed step. It reproduces the failure in an isolated sandbox, where it edits code and runs your tests. Failures it can’t reproduce stay on the list of what’s left. Reading logs needs the Actions permission; without it, HeyDeer works from the rest. See Security for how code execution is isolated.
Autopilot’s commits can’t change files in .github/workflows/. A changed workflow would run with your repository’s secrets before anyone reads it.
When Autopilot stops
| Reason | What happened |
|---|---|
| Ready | Nothing is left to fix. |
| Needs your answer | HeyDeer asked a question in a conversation or in its review, or needs you to confirm whether an earlier concern is resolved, and fixed everything else. Reply there, then start Autopilot again. |
| Someone else pushed | Any push that isn’t HeyDeer’s, including GitHub’s Update branch button. HeyDeer discards the round in progress and the reviews it held. |
| Round limit | Autopilot ran 5 rounds. |
| No progress | A round changed nothing and the same items are still open, two rounds in a row closed nothing, or everything still open is something a round said needs a person. Its comment says what a person must do about each item, such as add a secret or change a workflow. |
| Checks didn’t finish | Checks were still running after an hour. |
| Merge queue | The PR is in the merge queue, and a push would remove it. |
| Push rejected | GitHub rejected HeyDeer’s push, for example because a branch rule restricts who can push to the branch. |
| Credits or plan | The workspace ran out of credits or no longer has a paid plan. |
| Stopped by someone | Anyone with write access to the repository can stop it. |
| Access removed | The person who started Autopilot can no longer request reviews in the repository. |
| GitHub refused access | GitHub stopped HeyDeer from reading or updating the PR, for example after HeyDeer lost access to the repository. |
| PR changed | The PR was closed or merged, or its base branch changed. |
| Incomplete | HeyDeer couldn’t complete a round or its review of the latest commit. |
What HeyDeer posts on GitHub
- One Autopilot comment on the PR, updated as it works: what it’s doing now and what it’s fixing, with each finished round’s commits and what it worked on under History. HeyDeer hides its older Autopilot comments as outdated.
- Commits on the PR’s branch, and replies in the conversations it addressed.
- The HeyDeer Review check, which stays in progress while Autopilot runs.
- When Autopilot stops, its review of the latest commit, unless someone else pushed or the PR changed, and the outcome in its comment: why it stopped and what still needs you. When it needs you, for an answer or a problem it couldn’t get past, it posts a new comment that mentions whoever started Autopilot.
Autopilot’s pushes don’t start automatic reviews, and HeyDeer doesn’t request reviews from anyone. While Autopilot runs, HeyDeer’s review comments don’t show the Fix with HeyDeer and Autopilot buttons.
Automatic approval works as usual on the review HeyDeer publishes. To require a person’s approval after HeyDeer pushes, turn on Require approval of the most recent reviewable push in your branch rules. See Automatic approval.
Autopilot in HeyDeer lists every run in the repositories you can see. A run’s page shows its status, what’s still open and the credits used, and each round with what it worked on, its commits and replies, and the agent’s summary.
Credits
Each round’s fix and review use workspace credits like any other fix and review. Autopilot has no separate charge. See How credits work.