Files
docs/cli-docs/reference/issue/edit.md
T
bircni 55c3a392a1 feat: generate the gt command reference from gitea/cli
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]>
2026-10-22 11:28:15 +02:00

3.8 KiB

sidebar_position, description
sidebar_position description
5 Edit issues: title, body, labels, assignees, milestone, deadline

gt issue edit

Edit issues: title, body, labels, assignees, milestone, deadline

Synopsis

Edit one or more issues. Without flags on a terminal, a form edits one issue at a time,
starting from its current values. Label and assignee flags add to or remove from each issue's
current values; the --set flags replace them. The blocked_by and blocks JSON fields cost extra
requests, made only when the output includes them (see gt help formatting).

Gitea changes the milestone, assignees and due date only for people who can write to the issues
of the repository, and leaves them as they were for the author of an issue who cannot: gt then
names the flags or form fields it left out and fails. Gitea refuses their label changes outright,
so gt sends the other changes first.
gt issue edit {<number> | <url>}... [flags]

Examples

$ gt issue edit 12 --title "Crash on start" --add-label bug
$ gt issue edit 12 13 --add-assignee @me --milestone v1.0
$ gt issue edit 12 --remove-label wontfix --remove-milestone
$ gt issue edit 12 --add-blocked-by 9

Options

      --add-assignee login         Add assignees by login; @me for yourself
      --add-blocked-by issues      Mark the issue as blocked by other issues: N, #N, OWNER/REPO#N or a URL
      --add-label name             Add labels by name; prefix repo: or org: to disambiguate
      --add-project title          Add the issue to the project with this title (repeatable)
  -b, --body string                New body; empty clears it
  -F, --body-file file             Read the 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; empty clears it
  -e, --editor                     Edit the current body in the configured editor
  -h, --help                       help for edit
  -m, --milestone title            Move the issue to a milestone by title or ID
      --ref string                 Branch or tag the issue refers to; empty clears it
      --remove-assignee login      Remove assignees by login; @me for yourself
      --remove-blocked-by issues   Lift the dependency on other issues: N, #N, OWNER/REPO#N or a URL
      --remove-label name          Remove labels by name
      --remove-milestone           Remove the issue from its milestone
      --remove-project title       Take the issue off the project with this title (repeatable)
      --set-assignees strings      Replace all assignees; an empty value clears them
      --set-labels strings         Replace all labels; an empty value clears them
  -t, --title string               New title

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