Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions launchpad/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ gh pr create --base launchpad
place it is stated without admin.
- **Do not force-push during review.** Push new commits instead — force-pushing hides
what changed from the reviewer.
- **Run `gh repo set-default launchpad-26/buzz` once per clone, before the first
`gh issue create` or `gh pr create`.** Without it, `gh`'s default-repo resolution
targets `block/buzz` — the parent repository — for any command with no explicit
`--repo`. A write aimed at this fork (an issue, a PR comment) silently lands on
upstream's public tracker instead, and the mistake is not visible until someone
looks there. The setting lands in the shared `.git/config`, so it covers every
worktree of the clone, not just the one it was run in.

Before running any git command, activate the toolchain or hooks fail on `PATH`:

Expand Down
7 changes: 7 additions & 0 deletions launchpad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ or the CLI.
Branch from `launchpad`, commit with `-s` (the DCO check is not optional), and expect to
need one approving review — the branch is protected and you can't approve your own.

**Run `gh repo set-default launchpad-26/buzz` once per clone.** This fork's default
branch resolution otherwise targets `block/buzz` — the parent repository — for any `gh`
command with no explicit `--repo`, including `gh issue create` and `gh pr comment`. A
command aimed at this fork silently lands on upstream's public tracker instead. The
setting lands in the shared `.git/config`, so one invocation covers every worktree of
the clone too.

---

## What's in this directory
Expand Down
33 changes: 33 additions & 0 deletions launchpad/scripts/test-gh-set-default-guidance.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# Verifies #136's fix: both launchpad/README.md and launchpad/AGENTS.md tell
# contributors to run `gh repo set-default launchpad-26/buzz` once per clone,
# so a gh command with no explicit --repo does not silently target block/buzz.
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LAUNCHPAD_DIR="${SCRIPT_DIR}/.."

PASS=0
FAIL=0

check() {
local label=$1 ok=$2
if [ "${ok}" = "0" ]; then
echo "PASS: ${label}"
PASS=$((PASS + 1))
else
echo "FAIL: ${label}"
FAIL=$((FAIL + 1))
fi
}

for f in README.md AGENTS.md; do
status=1
grep -q "gh repo set-default launchpad-26/buzz" "${LAUNCHPAD_DIR}/${f}" && status=0
check "${f} tells contributors to run gh repo set-default" "${status}"
done

echo ""
echo "==================================================="
echo "${PASS} passed, ${FAIL} failed"
[ "${FAIL}" -eq 0 ]
Loading