Table of contents
- Why rerun pull request checks?
- Ways to rerun checks on GitHub pull requests
- Example: Automate reruns with GitHub Actions
- Compare rerun options
- How Graphite improves your PR rerun workflow
- Summary
When automated pull request checks—like CI builds or GitHub Actions—fail, you'll sometimes want to re-run them without modifying the code. GitHub shows these checks in the Checks tab of the PR, and rerunning them ensures the code meets quality or build requirements.
Why rerun pull request checks?
You may want to rerun pull request checks for several reasons:
- Intermittent test failures ("flakes")
- Environment-related issues (e.g. transient network or infra problems)
- Dependency or base branch changes that affect builds
- Manual triggers to unblock merges or confirm fixes
By rerunning PR checks, you ensure your pull request remains mergeable without needing unnecessary code changes.
Ways to rerun checks on GitHub pull requests
Use GitHub's UI
- Go to the Checks tab in the PR.
- Locate a failed (or completed) job.
- Click Re-run jobs or Re-run all jobs.
This reruns the checks on the current commit without pushing new code.
Push an empty commit
If you prefer using Git or want to avoid the UI:
git checkout your-feature-branchgit commit --allow-empty -m "github pr rerun checks"git push
This creates a no-op commit that triggers your CI system.
Amend and force-push
This also forces a rerun by changing the commit hash, even if no code changes:
git commit --amend --no-editgit push --force
NOTE: Use this only if you're comfortable rewriting commit history.
Close and reopen the pull request
Closing and reopening a PR triggers all status checks again. It's a quick option when other methods aren't available, though it may briefly disrupt the PR timeline or review context.
Use an automated GitHub Action
You can choose or create a GitHub Action to rerun specific checks automatically under defined conditions. For example, rerunning on approval.
Example: Automate reruns with GitHub Actions
To trigger reruns after a PR gets approved:
# .github/workflows/rerun-on-approval.ymlon:pull_request_review:types: [submitted]jobs:rerun_checks:if: github.event.review.state == 'approved'runs-on: ubuntu-lateststeps:- uses: shqear93/rerun-checks@v3with:github-token: ${{ secrets.GITHUB_TOKEN }}check-names: 'build, test'
This uses a community action to trigger reruns based on review state.
Compare rerun options
Method | Pros | Cons |
---|---|---|
UI "re-run jobs" | Intuitive and clean | Requires permissions and manual click |
Empty commit | Simple and scriptable | Pollutes commit history slightly |
Amend and force-push | No visual change in code | Force-push risks for team branches |
Close and reopen | No code change needed | Interrupts PR history |
GitHub Action automation | Hands-free reruns | Needs setup and permissions |
How Graphite improves your PR rerun workflow
Graphite helps you break up your work into smaller, more easily reviewable stacked pull requests. With smaller, atomic changes, you:
- Reduce the need to rerun large CI jobs repeatedly
- Only rerun checks on the affected PR, not downstream ones in the stack
- Stay unblocked by flaky CI using
gt sync
and autosync logic
Graphite's CLI (gt
) makes pushing, rebasing, and syncing PRs efficient, so triggering "github pr rerun checks" becomes more reliable. If a PR in the middle of your stack has failed checks, rerun just that layer using any of the above methods and Graphite will handle the rest.
Summary
When working with pull requests, you'll often want to re-run checks without changing your code. GitHub offers several ways to do this, including using the UI, Git CLI, force-push, closing and reopening the PR, or setting up automation. Tools like Graphite make it easier to manage multiple PRs and CI interactions, especially when working with stacked pull requests. By leveraging automation, you can streamline the rerun process and maintain a smooth, efficient PR workflow.