docs(plan-issue-mode): show how to capture a created issue number (avoid invalid -q on gh issue create) - #127
Merged
Conversation
gh/glab issue create prints the new issue's URL, not JSON — so appending
-q .number / --jq errors and can abort the create inside a $(…) capture. Add
the URL-parsing idiom (URL=$(gh issue create …); NUM=${URL##*/}) next to the
existing 'capture the issue numbers for the summary' instruction, plus a nudge
toward --body-file for multi-line bodies, so consumers (/do:plan-task,
/do:next, /do:replan) don't reach for an invalid -q flag.
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.
Summary
lib/plan-issue-mode.mdtells consumers to "capture the issue numbers (created and reused) for the command's final summary" but never shows how — andgh issue create/glab issue createprint the new issue's URL, not JSON. That gap leads to reaching for-q .number/--jq(as if it were a--jsoncommand), which errors and, inside a$(…)capture, can abort the create entirely (ghexits non-zero and takes any|| fallbackwith it).This adds the correct idiom right next to that instruction:
plus a nudge toward
--body-filefor multi-line bodies (backticks /$(…)in an inline--bodyget mangled or executed by the shell). Applies to bothghandglab(both print a URL). Docs-only; no command behavior changes.Test plan
lib/plan-issue-mode.md; no scripts or command logic touched.gh issue createoutput (URL formhttps://github.com/<owner>/<repo>/issues/<n>;${URL##*/}yields<n>).