AI Handling GitHub PRs: The Most Valuable Step Is to Reject First
A five-step workflow for using AI to handle GitHub PRs/Issues. The most counterintuitive part is asking first whether it is worth doing. Combined with additions from the comments, let's take a closer look.
Recently, Baoyu shared a workflow for using AI to handle GitHub PRs or Issues. PRs are requests to submit code changes; Issues are where people ask questions or make suggestions. The original tweet was short, but the comments brought up quite a lot.
The workflow has five steps.
- Analyze what problem this PR or Issue is trying to solve.
- Decide whether this problem is worth solving. If it is not, reject it outright.
- If it is worth solving, don't rush to look at the other person's PR first. Let the AI think it through on its own: how would I solve this problem?
- Compare the AI's independent solution with the actual changes in the PR. There are three possible outcomes:
- A: Merge directly. The quality is good—better than or roughly on par with the AI's proposed solution.
- B: Merge first, then follow up. The PR has no major problems, but the details aren't good enough. First merge the PR in a WorkTree, add follow-up, and finally merge into main. WorkTree is a Git feature that lets you create a separate working directory for validation and modification without affecting the main branch.
- C: Do not adopt the PR; implement it yourself, but add the author as a co-author.
- Local validation. Before merging, run it once and provide before-and-after comparison screenshots or a report.
The original tweet included two images.
Most of the discussion in the comments focused on step 2. One commenter asked: what are the criteria for judging whether something is worth doing? Number of likes, whether it aligns with the mainline, or maintenance cost? Someone offered a more down-to-earth approach: probability of occurrence, scope of impact, and cost to fix. Run through these three; if the direction is right, then what follows won't just be accelerating waste.
Another comment was even more pointed: AI's default is to just get to work. If you don't first ask whether it's worth doing, it can polish an unnecessary problem to perfection. In this entire workflow, the gate humans should guard most carefully is this one.
The thinking in step 3 is also quite interesting. One commenter put it even better: have the AI first produce an independent solution, then compare it with the PR; the review baseline shifts from how the author wrote it to how the problem should be solved. This commenter also added two constraints in practice: first, list the files and call chains involved in the PR, and don't draw conclusions just by looking at the diff; second, clearly state which changes will not be accepted even if the proposed solution is better, and why. This text can be pasted directly into PR comments, saving back-and-forth follow-ups.
Option C in step 4 was regarded by the comments as the most respectable way to handle things in the whole workflow. The problem really does exist, but the PR's approach is wrong; rather than accept it and fix it, it's better to implement it yourself. Close the PR while adding the author as a co-author. Don't take someone else's work for free, and don't force in unsuitable code.
Step 5, local validation, is the step many people are tempted to skip. One commenter said that if you merge without local validation and it goes wrong, you may not even be able to find a rollback point. The original tweet emphasized providing before-and-after comparison screenshots or a report—evidence—so this step cannot be skipped.
One commenter asked: how long does this workflow take per PR? If the volume grows, will it actually become more exhausting? The answer lies in step 2. Reject the things that aren't worth doing first; the rest, AI can handle fairly quickly.
发布时间: 2026-11-30 09:43