mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-05 17:45:46 +00:00
update_cli_docs.sh runs gt's own generator and lays the pages out for the site: one directory per command group, front matter, titles, sidebar order, fenced help text and rewritten links. --released succeeds while no series is documented. A weekly workflow proposes updates like the runner's. Signed-off-by: bircni <[email protected]>
83 lines
3.5 KiB
Markdown
83 lines
3.5 KiB
Markdown
---
|
|
sidebar_position: 4
|
|
description: "Create an issue"
|
|
---
|
|
|
|
# gt issue create
|
|
|
|
<!-- Generated by update_cli_docs.sh from the gitea/cli sources, do not edit. -->
|
|
|
|
Create an issue
|
|
|
|
## Synopsis
|
|
|
|
```text
|
|
Create an issue in a repository. Without flags on a terminal, a form asks for the title and
|
|
body, then optionally for assignees, a milestone, labels and a due date.
|
|
|
|
Gitea sets labels, a milestone, assignees and a due date only for people who can write to the
|
|
issues of the repository, and creates the issue without them for others: gt then names the
|
|
flags or form fields it left out and fails, and warns about left-out labels of a template.
|
|
Adding the issue to a project needs write access too; when that fails, the issue stays created
|
|
and the error names the command that adds it later.
|
|
|
|
--template starts from a repository issue template: its title, body, labels and ref. --title,
|
|
--label, --body, --body-file and --ref replace them; labels the repository lacks are left out.
|
|
A form (YAML) template starts with an empty body. On a terminal the form opens with the title
|
|
and body, and a template picked in the form applies its labels too. The title of a template is
|
|
a prefix to complete, so without the form --template requires --title. --web opens the
|
|
new-issue page with the whole template applied.
|
|
```
|
|
|
|
```
|
|
gt issue create [flags]
|
|
```
|
|
|
|
## Examples
|
|
|
|
```
|
|
$ gt issue create
|
|
$ gt issue create --title "Crash on start" --body "Steps to reproduce…" --label bug --milestone v1.0
|
|
$ gt issue create --template "Bug report"
|
|
```
|
|
|
|
## Options
|
|
|
|
```
|
|
-a, --assignee login Assign people by their login; @me for yourself
|
|
--attachment File File to attach after creation (repeatable)
|
|
-b, --body string Issue body
|
|
-F, --body-file file Read body from file, or - for stdin
|
|
--deadline date Due date: YYYY-MM-DD, RFC3339 or Unix timestamp; only the date counts, as the end of that day in UTC
|
|
-e, --editor Compose the issue body in the configured editor
|
|
-h, --help help for create
|
|
-l, --label name Add labels by name; prefix repo: or org: to disambiguate
|
|
-m, --milestone title Add the issue to a milestone by title or ID
|
|
-p, --project title Add the issue to the project with this title, the repository's or its organization's (repeatable)
|
|
--ref string Branch or tag the issue refers to
|
|
-T, --template name Start from the repository issue template with this name
|
|
-t, --title string Issue title
|
|
-w, --web Continue in the browser with the new-issue page
|
|
```
|
|
|
|
## Options inherited from parent commands
|
|
|
|
```
|
|
--cwd directory Working directory for repository discovery
|
|
--debug Log the method, URL, status, and duration of each HTTP request to stderr
|
|
--host URL Gitea instance URL, including any base path
|
|
--interactive Allow prompts with machine output
|
|
-q, --jq expression Filter JSON output using a jq expression; implies --json
|
|
--json fields[="*"] Output JSON with the specified comma-separated fields, or all fields
|
|
--no-input Disable prompts and implicit editor/browser interactions
|
|
--remote remote Git remote used for repository discovery
|
|
-R, --repo OWNER/REPO Select a repository as OWNER/REPO or URL
|
|
--sudo user Perform API requests as this user (requires an administrator account)
|
|
--user name Account name on the selected instance
|
|
-y, --yes Accept confirmations without prompting
|
|
```
|
|
|
|
## SEE ALSO
|
|
|
|
* [gt issue](../issue/index.md): Manage issues
|