gh-issue-create - Man Page
Create a new issue
Examples (TL;DR)
- Create a new issue against the current repository interactively: gh issue [new|create]
- Create a new issue with the buglabel interactively:gh issue [new|create] [-l|--label] "bug"
- Create a new issue interactively and assign it to the specified users: gh issue [new|create] [-a|--assignee] user1,user2,...
- Create a new issue with a title, body and assign it to the current user: gh issue [new|create] [-t|--title] "title" [-b|--body] "body" [-a|--assignee] "@me"
- Create a new issue interactively, reading the body text from a file: gh issue [new|create] [-F|--body-file] path/to/file
- Create a new issue in the default web browser: gh issue [new|create] [-w|--web]
- Display help: gh issue [new|create] [-h|--help]
Synopsis
gh issue create [flags]
Description
Create an issue on GitHub.
Adding an issue to projects requires authorization with the project scope. To authorize, run gh auth refresh -s project.
The --assignee flag supports the following special values: - @me: assign yourself - @copilot: assign Copilot (not supported on GitHub Enterprise Server)
Options
- -a, --assignee <login>
- Assign people by their login. Use "@me" to self-assign. 
- -b, --body <string>
- Supply a body. Will prompt for one otherwise. 
- -F, --body-file <file>
- Read body text from file (use "-" to read from standard input) 
- -e, ā--editor
- Skip prompts and open the text editor to write the title and body in. The first line is the title and the remaining text is the body. 
- -l, --label <name>
- Add labels by name 
- -m, --milestone <name>
- Add the issue to a milestone by name 
- -p, --project <title>
- Add the issue to projects by title 
- --recover <string>
- Recover input from a failed run of create 
- -T, --template <name>
- Template name to use as starting body text 
- -t, --title <string>
- Supply a title. Will prompt for one otherwise. 
- -w, ā--web
- Open the browser to create an issue 
Options Inherited from Parent Commands
- -R, --repo <[HOST/]OWNER/REPO>
- Select another repository using the [HOST/]OWNER/REPO format 
Aliases
gh issue new
Exit Codes
0: Successful execution
1: Error
2: Command canceled
4: Authentication required
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
Example
$ gh issue create --title "I found a bug" --body "Nothing works" $ gh issue create --label "bug,help wanted" $ gh issue create --label bug --label "help wanted" $ gh issue create --assignee monalisa,hubot $ gh issue create --assignee "@me" $ gh issue create --assignee "@copilot" $ gh issue create --project "Roadmap" $ gh issue create --template "Bug Report"