github-create-issues
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesegithub-create-issues
github-create-issues
Take a and create the issues in GitHub by driving
the bundled . The script creates the milestone and labels
if needed, creates each issue, then creates a tracking issue with a task list
linking them all.
github_backlog_input.jsoncreate_github_issues.pyCreating issues is effectively un-undoable (close is manual; notifications already
fired). So this skill is built around a hard gate: visual dry-run always, real
run only on an explicit "yes".
For the exact JSON shapes see .
${CLAUDE_PLUGIN_ROOT}/references/data-contracts.md通过运行内置的脚本,读取文件并在GitHub中创建Issues。该脚本会在需要时创建里程碑和标签,逐个创建Issue,然后生成一个包含所有Issue任务列表的追踪Issue。
create_github_issues.pygithub_backlog_input.json创建Issue的操作基本无法撤销(关闭需手动操作,且通知已发出)。因此该技能设置了严格的确认机制:始终先执行可视化预执行,仅在用户明确回复“yes”后才执行实际创建操作。
关于具体的JSON格式,请参考。
${CLAUDE_PLUGIN_ROOT}/references/data-contracts.mdPrerequisites
前置条件
- Auth — once (the script reads
gh auth login). Or setgh auth token. See the$env:GH_TOKENskill.github-auth - Owner/repo — set /
$env:GH_OWNER, or include$env:GH_REPO/ownerin the JSON. Env vars override the JSON.repo - Python + requests + openpyxl — run the setup checker if unsure:
powershell -ExecutionPolicy Bypass -File "${CLAUDE_PLUGIN_ROOT}/scripts/setup_check_github.ps1"
- 身份验证 — 先执行(脚本会读取
gh auth login)。或者设置环境变量gh auth token。可查看$env:GH_TOKEN技能了解详情。github-auth - 仓库所有者/仓库名 — 设置环境变量/
$env:GH_OWNER,或在JSON文件中包含$env:GH_REPO/owner字段。环境变量优先级高于JSON文件中的配置。repo - Python + requests + openpyxl — 若不确定是否已安装,可运行检查脚本:
powershell -ExecutionPolicy Bypass -File "${CLAUDE_PLUGIN_ROOT}/scripts/setup_check_github.ps1"
Step 1 — VISUAL DRY-RUN (creates nothing)
步骤1 — 可视化预执行(不会创建任何内容)
GitHub Issues has no API. Instead: read
and render a formatted table for the user to review before any API call.
validateOnlygithub_backlog_input.jsonPresent:
# | Key | Title | Labels | Assignee
---|--------|------------------------------------|----------------------|---------
1 | row-1 | Portal label "Auto" should show... | bug, P1, size:S | —
2 | row-2 | Add rate limiting to API | enhancement, P2, ... | pon
...
Milestone: Audit Wave 1
Tracking issue: yes (created last, links all above)
Total: 2 issuesGATE — stop here. Do not proceed until the user has explicitly approved the list (e.g. "create them", "go ahead", "yes").
If the user requests changes, update and re-render the
table. The table is free — re-rendering costs nothing.
github_backlog_input.jsonGitHub Issues没有 API。因此我们采取的方式是:读取文件,渲染格式化表格供用户在调用任何API前进行审核。
validateOnlygithub_backlog_input.json展示格式如下:
# | Key | Title | Labels | Assignee
---|--------|------------------------------------|----------------------|---------
1 | row-1 | Portal label "Auto" should show... | bug, P1, size:S | —
2 | row-2 | Add rate limiting to API | enhancement, P2, ... | pon
...
Milestone: Audit Wave 1
Tracking issue: yes (created last, links all above)
Total: 2 issues确认关卡 — 在此暂停。在用户明确批准该列表前(例如“创建它们”“继续”“yes”),请勿继续执行。
如果用户要求修改,请更新并重新渲染表格。渲染表格无任何成本,可以反复操作。
github_backlog_input.jsonStep 2 — REAL RUN (only after explicit approval)
步骤2 — 实际执行(仅在明确批准后进行)
powershell
$env:GH_OWNER = "Cartagena365"
$env:GH_REPO = "GlassHull"
python "${CLAUDE_PLUGIN_ROOT}/scripts/create_github_issues.py" `
--input "<workdir>/github_backlog_input.json" `
--output "<workdir>/github_backlog_result.json"The script prints one line per created issue () and a final
. Then it writes .
key X -> #N <url>tracking issue -> #N <url>github_backlog_result.jsonRelay the output to the user. Surface any failure clearly — a partial run is better
visible than silent.
powershell
$env:GH_OWNER = "Cartagena365"
$env:GH_REPO = "GlassHull"
python "${CLAUDE_PLUGIN_ROOT}/scripts/create_github_issues.py" `
--input "<workdir>/github_backlog_input.json" `
--output "<workdir>/github_backlog_result.json"脚本会为每个创建的Issue打印一行信息(格式为),最后打印追踪Issue的信息()。随后会生成文件。
key X -> #N <url>tracking issue -> #N <url>github_backlog_result.json将脚本输出信息同步给用户。若出现失败需清晰告知用户——部分执行失败比静默失败更易被察觉。
After creating — verify
创建完成后 — 验证
Confirm the items landed. Check — every item should
have a and . Items without a failed; surface them to the user.
github_backlog_result.jsonnumberurlnumber确认所有条目已成功创建。检查文件——每个条目都应包含和字段。没有字段的条目表示创建失败,需告知用户。
github_backlog_result.jsonnumberurlnumberIdempotency — don't double-create
幂等性 — 避免重复创建
create_github_issues.pygithub_backlog_input.jsonIssue #Issue URLkeycreate_github_issues.pygithub_backlog_input.jsonIssue #Issue URLkey