PR/Branch Checks
Before each iteration, GitAuto checks whether the PR is still open and the branch still exists on GitHub. If either has been closed or deleted, the agent stops processing immediately instead of continuing to work on a dead target.
Why This Exists
A user might close a PR or delete a branch while GitAuto is still actively working on it. Without these checks, the agent continues making commits to a dead branch, burning API tokens, Lambda compute time, and CI minutes for work that will never be reviewed or merged.
How It Works
At the start of each iteration, GitAuto makes two GitHub API calls: one to check the PR's state (open, closed, or merged) and one to verify the branch ref exists. If the PR is no longer open or the branch has been deleted, the agent logs the reason, updates any internal tracking, and exits cleanly. No commit is attempted, and no CI run is triggered.
Need Help?
Have questions or suggestions? We're here to help you get the most out of GitAuto.
Contact us with your questions or feedback!