Recipe: deliver to a GitHub pull request
Each finished card becomes one Markdown file in a pull request on your repository. Nothing merges on its own: a person reviews and merges the pull request in GitHub.
Before you run it
- In GitHub, create a fine-grained personal access token for just the one repository, with Contents: Read and write and Pull requests: Read and write.
- Put it in the
GITHUB_TOKENenvironment variable in the shell that runs Claude Code or Codex. Never paste it into chat. - Fill in
{{OWNER/REPO}}and{{BOARD_NAME}}below.
The prompt
In BakedBrie, make the board "{{BOARD_NAME}}" deliver finished cards as pull requests on GitHub. Use only the BakedBrie MCP tools. Start with whoami and stop if destinations is off.
1. Find the board with list_boards.
2. Call prepare_secret with kind github, purpose destination and env_var GITHUB_TOKEN. Run the command it returns in my shell exactly as given, then use the drop_id. Never ask me to paste the token and never print it.
3. Create a destination with manage_destination: action create, type github, name "GitHub {{OWNER/REPO}}", github {"repo": "{{OWNER/REPO}}", "base_branch": "main", "path_template": "{board-slug}/{yyyy-mm-dd}-{card-slug}-{card-hash}.md", "pr_title_template": "{card-title}"}, credential {"drop_id": "<the drop id>"}.
4. Test it with manage_destination action test and tell me the result.
5. Make it the board's default destination with manage_destination action set_board_default.
6. Read it back with manage_destination action get and tell me the repo, branch, path template and whether the board default is set.
What to expect
- Delivery happens when a card finishes. On a board with a work folder, it waits for a person's review first.
- File names that collide get
-2,-3added. list_resultsshows each delivery's receipt: the pull request URL, the commit and every file with its sha256.- A failed or "outcome unknown" delivery can be retried with
redeliver. The retry first looks for a pull request an earlier try may have opened, so it never opens a second one. - To send one card somewhere else, use
manage_destinationactionset_card_overrideon that card.
If something fails
- The test fails with an auth error: the token is wrong, expired or missing a permission. Make a new token and run the prompt again from step 2.
REVISION_CONFLICTon update: read the destination withgetand pass its currentrevisionasexpected_revision.- Every code: Refusals.