fix(mirror-it): create GitHub target repo before registering push mirror #9

Open
rootiest wants to merge 1 commits from feat-mirror-it-github-repo-check into main
Owner

Summary

  • GitHub doesn't auto-create a repo on first push the way Gitea does, so a push mirror pointed at a nonexistent GitHub repo registers successfully but fails on every sync attempt.
  • Adds a step to the mirror-it skill that checks whether the target GitHub repo exists before registering the mirror, and creates it if not — preferring gh repo create, falling back to a GitHub MCP server, then to the plain REST API via curl and $GITHUB_TOKEN.
  • If none of those capabilities are available, the skill no longer silently proceeds — it must warn the user clearly that they need to create the target repo manually before the mirror's first sync will succeed.
  • Bumps plugin version 1.0.0 -> 1.1.0.

Manual Verification Checklist

  • Run /mirror-it against a Gitea repo whose GitHub target repo does NOT exist yet, with gh authenticated — confirm the repo is created before the mirror registers.
  • Run /mirror-it against a Gitea repo whose GitHub target repo already exists — confirm it's left untouched and no error is raised.
  • Temporarily make gh/MCP/curl unavailable and confirm the skill still registers the mirror but clearly warns about manual repo creation.
  • Confirm $GITHUB_TOKEN is never echoed/printed during any of the above.
## Summary - GitHub doesn't auto-create a repo on first push the way Gitea does, so a push mirror pointed at a nonexistent GitHub repo registers successfully but fails on every sync attempt. - Adds a step to the `mirror-it` skill that checks whether the target GitHub repo exists before registering the mirror, and creates it if not — preferring `gh repo create`, falling back to a GitHub MCP server, then to the plain REST API via `curl` and `$GITHUB_TOKEN`. - If none of those capabilities are available, the skill no longer silently proceeds — it must warn the user clearly that they need to create the target repo manually before the mirror's first sync will succeed. - Bumps plugin version 1.0.0 -> 1.1.0. ## Manual Verification Checklist - [x] Run `/mirror-it` against a Gitea repo whose GitHub target repo does NOT exist yet, with `gh` authenticated — confirm the repo is created before the mirror registers. - [x] Run `/mirror-it` against a Gitea repo whose GitHub target repo already exists — confirm it's left untouched and no error is raised. - [x] Temporarily make `gh`/MCP/curl unavailable and confirm the skill still registers the mirror but clearly warns about manual repo creation. - [x] Confirm `$GITHUB_TOKEN` is never echoed/printed during any of the above.
rootiest added 1 commit 2026-08-25 04:32:55 +00:00
fix(mirror-it): create GitHub target repo before registering push mirror
Generate plugin manifests / generate (pull_request) Skipped
Generate plugin manifests / validate (pull_request) Successful in 17s
eeff00b5e7
GitHub, unlike Gitea, doesn't create a repo on first push, so a mirror
pointed at a nonexistent GitHub repo would register successfully but
fail every sync. Check for the target repo via gh/MCP/REST API and
create it if missing, falling back to a clear manual-creation warning
when no capability is available. Bumps plugin version to 1.1.0.
All checks were successful
Generate plugin manifests / validate (pull_request) Successful in 17s
Generate plugin manifests / generate (pull_request) Skipped
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat-mirror-it-github-repo-check:feat-mirror-it-github-repo-check
git checkout feat-mirror-it-github-repo-check
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rootiest/rootiest-ai#9