fix: sub_issue_id に integer database ID を使うようサンプルを修正 - #47
Merged
Conversation
`gh issue view --json id` は GraphQL の node ID (例: `I_kwDO...`) を返すため、 integer の database ID を要求する REST `POST .../sub_issues` の `sub_issue_id` には使えない。`gh api repos/.../issues/<N>` の `.id` (integer) に置き換え、 送信側も `-F` で integer 型として送るよう修正。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI rule: all skills changed in a single PR must share the same version number. Bump issue-refine 1.0.1 → 1.0.3 to match issue-create. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
issue-create/issue-refineの sub-issue 紐づけサンプルで、gh issue view --json id --jq '.id'を使って取得した値をgh api .../sub_issues -f sub_issue_id=...に渡していたが、これは GraphQL の node ID(I_kwDO...のような文字列)であり、REST API が要求する integer の database ID ではないため、実行時に失敗していた。背景
GitHub REST の POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues は
sub_issue_idを integer と定義している。一方gh issue view --json idは GraphQL 経由で node ID を返すため、両者は別物。実例(issue #37 で確認):
gh issue view 37 --json id --jq '.id'→I_kwDOSWy_FM8AAAABD3k9nQ(node ID, 文字列)gh api repos/.../issues/37 --jq '.id'→4554571165(database ID, integer)変更内容
skills/issue-create/SKILL.md(v1.0.2 → v1.0.3)skills/issue-refine/SKILL.md(v1.0.0 → v1.0.1)それぞれ以下のように修正:
CHILD_IDの取得をgh api "repos/${REPO}/issues/${N}" --jq '.id'に変更(integer database ID を取得)gh api ... sub_issuesの-fを-Fに変更(-fは string、-Fは integer / boolean などを型推論付きで送る)検証
cross-review (codex backend) を通過。critical / warning / info すべて 0 件。
🤖 Generated with Claude Code