Setup guides
Set up GitHub
Install and log in to the GitHub CLI and set your git identity, so Picnic jobs can push branches, open pull requests, check CI and merge.
Picnic works with GitHub through the official GitHub CLI, gh, on each machine. It uses gh to open draft pull requests, read CI, merge and, for a Ship job given a pull request, check out that pull request. The CLI runs under the machine's own GitHub login, just like Claude Code.
Install the GitHub CLI
brew install gh
The Fix button next to the GitHub CLI check runs this for you when Homebrew is installed.
Log in
In Terminal on the machine:
gh auth login
Choose GitHub.com, HTTPS and log in with a browser. The setup sheet's Log in button opens Terminal so you can do this yourself.
Scopes
Picnic needs the repo and workflow scopes. Without workflow, GitHub refuses pushes that touch files in .github/workflows. If the check is amber with "missing the repo and workflow scope" or similar, run:
gh auth refresh -s repo,workflow
Set your git identity
Commits fail when git has no name or email. Set them once per machine:
git config --global user.name "Your Name"
git config --global user.email you@example.com
Use the email on your GitHub account if you want commits linked to your profile.
Check it
| Check | Green means | Fix |
|---|---|---|
| GitHub CLI logged in | gh auth status reports a login with the repo and workflow scopes |
brew install gh, then gh auth login; for missing scopes gh auth refresh -s repo,workflow |
| Git identity | Global user.name and user.email are set |
The two git config --global commands above |
What Picnic does with gh
Branches and draft pull requests
Every job gets its own branch, named <first name>/<slug>-<id8>: the machine user's first name, a short slug from the job and the last 8 characters of its id. For example jeremy/fix-login-redirect-a1b2c3d4. On jobs that change code, the agent pushes from its first commit and opens a draft pull request, then keeps its title and description up to date as it works.
CI checks
Before merging, Picnic reads CI with:
gh pr checks --required
If the repository has no required checks it looks at all checks, and if there are none at all it treats CI as green and says so on the job. A skipped or cancelled required check doesn't count as green. Pending checks are polled every 30 seconds, for as long as they run. See Waiting on CI.
Merging
Merges are squash merges:
gh pr merge --squash
A draft pull request is marked ready first. The agent merges itself in Ship jobs, and in Plan and build jobs when you tell it to, and Picnic merges anything the agent leaves ready once its own CI check passes. Picnic never force-pushes and the agent can't approve its own pull request.
Branch rules and auto-merge
If GitHub refuses the merge because of branch rules Picnic can't meet, such as a required review, Picnic turns on GitHub's auto-merge (gh pr merge --squash --auto) and moves the job to Needs you, ready to review. It checks every 2 minutes and finishes the job when GitHub merges or closes the pull request. Meanwhile you can choose Merge now to try again, or Merge with admin bypass if you have admin rights and want to skip the rule. See Review and merge.
Taking over a pull request
A Ship job given a pull request's URL works on that pull request. Picnic runs gh pr checkout <url> in a fresh worktree, so pull requests from forks work too.
Other git hosts
Picnic's pull request, CI and merge steps use the GitHub CLI, so they need GitHub. Plan jobs don't push, so they work with any git repository.
More help: GitHub CLI problems.
