Fix sync workflow self-include (polluted GitHub with gh-mirror/) #111
Reference in New Issue
Block a user
Delete Branch "fix/sync-workflow-self-include"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Real bug surfaced by the first run: the workflow cloned the GitHub mirror into
./gh-mirror(inside the source checkout), and rsync./->gh-mirror/swept that directory back into the destination. The public mirror now has a straygh-mirror/subtree. Fix: clone into${RUNNER_TEMP:-/tmp}/awc-gh-mirrorinstead, plus a belt-and-suspenders--exclude='gh-mirror/'rsync rule.Merging this PR triggers the next sync, which (via
rsync --delete) will also remove the stray directory from GitHub.🤖 Generated with Claude Code
The sync workflow cloned the GitHub mirror into `./gh-mirror` (under the source checkout), then rsync `./` -> `gh-mirror/` swept the `gh-mirror` directory back into the destination, polluting the public mirror with a `gh-mirror/` subtree. Clone to `${RUNNER_TEMP:-/tmp}/awc-gh-mirror` instead, and add a belt-and-suspenders `--exclude='gh-mirror/'` so a future re-use of the old name can't recur. The next sync will, via rsync --delete, also remove the polluted directory from GitHub. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TfzV5QvtPDz8LJS3Pu5VLT