fork-auto-apply-access — Claude Code rule: what it does
fork-auto-apply-access tells the agent how to react when GitHub refuses Gitar's automatic repair on a fork pull request: analysis goes on, the fix commit does not.
Apache-2.0 ★ 1,118 updated 2026-10-24
.claude/rules/fork-auto-apply-access.mdWhat fork-auto-apply-access does
The rule covers the moment GitHub blocks Gitar from pushing an automatic repair into a fork pull request. The agent reports back that review and CI keep running while no fix commit landed. Instead of retrying the write, it leaves the exact repair in the analysis.
Five steps sit inside. Do not repeat the push. Do not touch an explicit gitar auto-apply:off. Do not ask for tokens, secrets or repository membership as a way around GitHub's fork permission boundary. One detail stands out: when GitHub offers “Allow edits and access to secrets by maintainers”, telling the contributor to enable it is off limits. The single notice about “Allow edits from maintainers” comes from the trusted GitHub Action.
Drafts and pull requests labeled gitar-skip are out of scope. Once the contributor grants ordinary maintainer-edit permission and explicitly asks for another auto-apply pass, the agent performs only the bounded repairs the repository instructions allow. It never tries to slip past the fork permission boundary. That is the whole point: the agent stays inside what GitHub permits.
What it helps with
- explain to a contributor why no repair commit landed
- stop the agent from repeating a rejected push
- leave an explicit
gitar auto-apply:offchoice alone - separate maintainer edit rights from secret access
- skip drafts and pull requests tagged
gitar-skip
Example prompts for the agent
- Gitar could not push the repair to the fork PR. Say analysis continues and skip the retry.
- The contributor set
gitar auto-apply:off, leave that setting as it is. - Maintainer edits are granted and the contributor asked for another pass — run only the repairs the repo instructions allow.
How to install fork-auto-apply-access
Manually: put the files in place
.claude/rules/fork-auto-apply-access.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/fork-auto-apply-access.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/fork-auto-apply-access.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/fork-auto-apply-access.mdManually: put the files in place
.clinerules/fork-auto-apply-access.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about fork-auto-apply-access
How do I install fork-auto-apply-access in Claude Code?
Put the rule text into .claude/rules/fork-auto-apply-access.md inside the repository.
What does fork-auto-apply-access do?
It sets the agent's boundaries when GitHub rejects an automatic repair push to a fork pull request: no repeated writes, no permission workarounds, and the precise repair kept in the analysis.
What if GitHub shows “Allow edits and access to secrets by maintainers”?
Do not ask the contributor to turn it on. The rule waits for ordinary maintainer edit permission plus an explicit request for a new pass.
Source text
fork-auto-apply-access.md · Apache-2.0
--- title: "Handle denied fork auto-apply" description: "Keep analysis useful when GitHub rejects a Gitar repair push to a fork." type: automation when: "Gitar cannot push an automatic repair to a ready-for-review fork pull request. Skip drafts and pull requests labeled gitar-skip." actions: "Do not retry a write or change the contributor's auto-apply setting. Keep the precise repair in analysis; the trusted repository workflow posts one contributor notice." --- # Fork auto-apply access When GitHub prevents Gitar from pushing to a managed fork pull request: 1. Say that review and CI analysis can continue, but no repair commit was applied. 2. Do not retry the push or change an explicit `gitar auto-apply:off` choice. 3. The trusted GitHub Action may post one notice explaining **Allow edits from maintainers**. If GitHub presents **Allow edits and access to secrets by maintainers**, do not ask the contributor to enable it. 4. Do not request tokens, secrets, repository membership, or a workaround that bypasses GitHub's fork permission boundary. 5. Once the contributor grants ordinary maintainer-edit permission and explicitly requests another auto-apply pass, perform only the bounded repairs allowed by the repository instructions.
© hashgraph-online · Apache-2.0 · hashgraph-online/hol-guard