Skip to content

tools: mirror upstream issues into the fork - #39

Open
fffluffy-dev wants to merge 1 commit into
mainfrom
claude/mirror-upstream-issues
Open

fffluffy-dev wants to merge 1 commit into
mainfrom
claude/mirror-upstream-issues

Conversation

@fffluffy-dev

Copy link
Copy Markdown
Owner

tools/dev/mirror_upstream_issues.py copies omonkeyz/xbox-emulator issues into the fork as [upstream #N] … issues.

What it does

  • Reads upstream issues through the GitHub search API (gh api).
  • Finds the fork issues that already mirror them, by the line Mirrored from `owner/repo#N` or by an [upstream #N] title.
  • Plans the open upstream issues that have no mirror yet.

Options

  • It is a dry run unless you pass --apply.
  • --json FILE writes the plan.
  • --only N, --skip N, --search TERMS and --upstream-label L narrow the set.
  • --label sets the labels on created mirrors (default upstream).
  • --sync-state closes a mirror once its upstream issue is closed.
  • --live-links keeps references and links live. By default, mentions, #N / owner/repo#N references and issue URLs become code spans outside code blocks, so a mirror notifies nobody and adds no back-links upstream.

Examples

python3 tools/dev/mirror_upstream_issues.py --state open
python3 tools/dev/mirror_upstream_issues.py --search GTA --apply
python3 tools/dev/mirror_upstream_issues.py --state all --sync-state --apply

Tests and first use


Generated by Claude Code

tools/dev/mirror_upstream_issues.py reads omonkeyz/xbox-emulator issues through
the GitHub search API (gh api), finds the fork issues that already mirror them
(the "Mirrored from `owner/repo#N`" line or an "[upstream #N]" title) and plans
the open ones that are missing. It is a dry run unless --apply; --json writes
the plan, --only/--skip/--search/--upstream-label narrow it, --sync-state also
closes mirrors whose upstream issue is closed.

Mentions, issue references and issue URLs in the copied text become code spans
(outside code blocks), so a mirror notifies nobody and adds no back-links to
upstream issues; --live-links keeps them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014vTZArnDeG1xtBcLprpoCq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants