From e2f69976aa24fac7111e2edf28cc087c75bb9eb5 Mon Sep 17 00:00:00 2001 From: Johannes Ewald Date: Sat, 8 Aug 2026 12:47:43 +0200 Subject: [PATCH] docs: document PR base-branch pitfall for forked template projects Downstream forks of peerigon/template default new PRs to the upstream repo, which fails fork-specific checks like CODEOWNERS and rulesets. --- AGENTS.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 1bb4300..e3ac885 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -58,6 +58,18 @@ git remote set-url --push template DISABLED Verify with `git remote -v`: `template` should show a normal fetch URL and `DISABLED` (or empty) for push. +## Opening pull requests + +Projects generated from this template are **GitHub forks** of `peerigon/template`, so both the web UI's compare page and a fresh `gh` checkout default a new pull request's base to the **upstream** repo (`peerigon/template`). A PR opened that way targets the template, and checks that depend on the fork's repo (CODEOWNERS, rulesets) then fail against the wrong repository. + +Run this once per clone of the forked repo: + +```bash +gh repo set-default / +``` + +After that `gh pr create` targets the fork. The web UI keeps preselecting the upstream — always confirm the base is `/` before creating a PR there, or use `gh pr create --repo /`. + ## Pulling Updates from Template If the user is asking you to pull in updates from the template repository, follow the steps below.