Repository navigation
non-interactive issue create with template #7405
Description
Activity
@Gray-Wind The
--filloption forpr createcommand populates a pull request title and body with information from git commits, what would you suggest we fill the the issue title and body with in this case since there are no git commits associated with an issue?- addedmore-info-neededMore info needed from user/contributorMore info needed from user/contributorand removedneeds-triageneeds to be reviewedneeds to be reviewed
on May 7, 2023 Okay, got it, what I suggest, is to keep the body from the template itself. The title should be provided with the
ghtool.The option could have a different name, for instance, it could be
--submit, which is aligned with interactive options.- addeddiscussFeature changes that require discussion primarily among the GitHub CLI teamFeature changes that require discussion primarily among the GitHub CLI teamand removedmore-info-neededMore info needed from user/contributorMore info needed from user/contributor
on May 8, 2023 - addedcoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsand removeddiscussFeature changes that require discussion primarily among the GitHub CLI teamFeature changes that require discussion primarily among the GitHub CLI team
on Jun 12, 2023 I think what @Gray-Wind tried to run is perfectly reasonable and should work non-interactively. This is related to #7575 , though, so I think instead of acting on this issue specifically we should roll it into the wider UX improvements we want for pr/issue create.
Reacted by Ilia Kolo- addedgh-issuerelating to the gh issue commandrelating to the gh issue command
on Oct 3, 2023 Any word on when this will be implemented? Would be great to create tickets via cli without interaction!
Reacted by Gustaf Edén, itchyny, Alejandro Menocal, AMSearer, Will Dean, Jag Goraya and Josef HoferReacted by Will DeanI too am having the same issue!
As workaround for non-interactively creating an issue from a template, I am using the
--body-fileparameter, and adding a helper function to parse the contents of the desired template, stripping out the frontmatter:template-body-file() { TEMPLATE_PATH=".github/ISSUE_TEMPLATE/<FILENAME>.md" local BODY_FILE BODY_FILE=$(mktemp) # Remove the issue template front matter and keep only the Markdown body. awk ' NR == 1 && $0 == "---" { in_front_matter = 1; next } in_front_matter && $0 == "---" { in_front_matter = 0; next } !in_front_matter { print } ' "$TEMPLATE_PATH" > "$BODY_FILE" printf "%s\n" "$BODY_FILE" } BODY_FILE=$(template-body-file) gh issue create \ --repo "$ORG/$REPO" \ --title "<TITLE>" \ --body-file "$BODY_FILE" \
- added a commit that references this issue
on Aug 18, 2026
Describe the feature or problem you’d like to solve
I am trying to create a special templated issue from the CI with some checklists on release. We have already set up templates, which we are using now manually, but it would be really good to open them automatically.
With
ghI can create a templated issue withgh issue create -T "template name" --title "some title"and it asks me to modify body (I do not want to do so, it is just a checklist to deal with it later). Also it asks what to do upon creation (add metadata, open in browser), which should be possible to skip.Proposed solution
The last confirmation step is called submit, the option could have the same name to reflect the action.
Full CI command will look like