A set of commands to quickly assess the state of a Pull Request.
gh pr status --json number,title,state,conflict,reviewDecision,headRefName,headRepositoryOwner
gh pr checks
gh pr view --comments
Commands to investigate why a specific test is failing.
gh run list --workflow= --branch= --json databaseId,name,status,conclusion
gh run view --log-failed
A sequence of commands to resolve merge conflicts locally using rebase.
git checkout main
git pull origin main
git checkout
git rebase main
After resolving conflicts manually, continue the rebase.
git rebase --continue
Force push with lease is preferred for safety.
git push --force-with-lease
If force-with-lease fails, a regular force push can be used.
git push --force
Command to check out a pull request branch locally.
gh pr checkout
After pushing changes, use this command to monitor the CI/CD pipeline in real-time.
gh pr checks --watch