Skip to content

gitlab edit-issue

Edit gitlab issue

Description

Edit gitlab issue

Synopsis

gitlab edit-issue
    [--site <site>]
    [--title <title>]
    --assignee <assignee>
    [--confidential]
    [--created_at <created_at>]
    [--description <description>]
    [--due_date <due_date>]
    [--epic_id <epic_id>]
    --project <project>
    --issue <issue>
    [--issue_type <issue_type>]
    [--labels <labels>]
    [--remove_labels <remove_labels>]
    [--state_event <state_event>]
    [--weight <weight>]
    [--updated_at <updated_at>]

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

title - (string)

     Title of an issue
     Example: --title "issue1"
     Default: _None_      Attributes: optional

assignee - (string)

     The username of the user to assign the issue to.
     Example: --assignee "1"
     Default: _None_      Attributes: required

confidential - (bool)

     Set an issue to be confidential. Default is false.
     Example: --confidential
     Default: _None_      Attributes: optional

created_at - (time)

     When the issue was created. Requires administrator or project/group owner rights.
     Example: --created_at "1 day ago"
     Default: _None_      Attributes: optional

description - (string)

     The description of an issue. Limited to 1,048,576 characters.
     Example: --description "issue1"
     Default: _None_      Attributes: optional

due_date - (string)

     The due date. Date time string in the format YYYY-MM-DD
     Example: --due_date "2016-03-11"
     Default: _None_      Attributes: optional

epic_id - (int)

     ID of the epic to add the issue to. Valid values are greater than or equal to 0.
     Example: --epic_id 1
     Default: _None_      Attributes: optional

project - (string)

     The path of the project
     Example: --project "saiprakash_maira/testing"
     Default: _None_      Attributes: required

issue - (int)

     The internal ID of a project’s issue
     Example: --issue 1
     Default: _None_      Attributes: required

issue_type - (string)

     The type of issue. One of issue, incident, or test_case. Default is issue.
     Example: --issue_type "issue"
     Default: _None_      Attributes: optional

labels - (string)

     Label names for an issue
     Example: --labels "label"
     Default: _None_      Attributes: optional, multiple allowed

remove_labels - (string)

     Label names to remove from an issue.
     Example: --remove_labels "label"
     Default: _None_      Attributes: optional, multiple allowed

state_event - (string)

     The state event of an issue. Set close to close the issue and reopen to reopen it
     Example: --state_event "reopen"
     Default: _None_      Attributes: optional

     Validation:
         allowed values: close, reopen

weight - (int)

     The weight of the issue. Valid values are greater than or equal to 0.
     Example: --weight 10
     Default: _None_      Attributes: optional

updated_at - (time)

     When the issue was updated.
     Example: --updated_at "1 day ago"
     Default: _None_      Attributes: optional

Examples

Input:

! gitlab edit-issue --project "saiprakash_maira/testing" --issue 4 --description "hello new edit"
Output:
{
  "id": 97399269,
  "iid": 4,
  "project_id": 31319463,
  "title": "issue3",
  "description": "hello new edit",
  "state": "opened",
  "created_at": "2016-03-11T03:45:40.000Z",
  "updated_at": "2021-11-16T12:35:51.270Z",
  "closed_at": null,
  "closed_by": null,
  "labels": [ "new_label" ],
  "milestone": null,
  "assignees": [
    {
      "id": 10215385,
      "name": "Sai Prakash V",
      "username": "saiprakash_maira",
      "state": "active",
      "avatar_url": "https://secure.gravatar.com/avatar/21de8fa15da66206e835a51bf9b68c32?s=80\u0026d=identicon",
      "web_url": "https://gitlab.com/saiprakash_maira"
    }
  ],
  "author": {
    "id": 10215385,
    "name": "Sai Prakash V",
    "username": "saiprakash_maira",
    "state": "active",
    "avatar_url": "https://secure.gravatar.com/avatar/21de8fa15da66206e835a51bf9b68c32?s=80\u0026d=identicon",
    "web_url": "https://gitlab.com/saiprakash_maira"
  },
  "type": "ISSUE",
  "assignee": {
    "id": 10215385,
    "name": "Sai Prakash V",
    "username": "saiprakash_maira",
    "state": "active",
    "avatar_url": "https://secure.gravatar.com/avatar/21de8fa15da66206e835a51bf9b68c32?s=80\u0026d=identicon",
    "web_url": "https://gitlab.com/saiprakash_maira"
  },
  "user_notes_count": 2,
  "merge_requests_count": 0,
  "upvotes": 0,
  "downvotes": 0,
  "due_date": "2021-12-12",
  "confidential": false,
  "discussion_locked": false,
  "issue_type": "issue",
  "web_url": "https://gitlab.com/saiprakash_maira/testing/-/issues/4",
  "time_stats": {
    "time_estimate": 0,
    "total_time_spent": 0,
    "human_time_estimate": null,
    "human_total_time_spent": null
  },
  "task_completion_status": {
    "count": 0,
    "completed_count": 0
  },
  "weight": 10,
  "blocking_issues_count": 0,
  "has_tasks": false,
  "_links": {
    "self": "https://gitlab.com/api/v4/projects/31319463/issues/4",
    "notes": "https://gitlab.com/api/v4/projects/31319463/issues/4/notes",
    "award_emoji": "https://gitlab.com/api/v4/projects/31319463/issues/4/award_emoji",
    "project": "https://gitlab.com/api/v4/projects/31319463"
  },
  "references": {
    "short": "#4",
    "relative": "#4",
    "full": "saiprakash_maira/testing#4"
  },
  "subscribed": true,
  "moved_to_id": null,
  "service_desk_reply_to": null,
  "health_status": null
}

Access Control

To use this command, you need access to the following:

Field Value
Action "update"
Service Type "gitlab"
Service Instance
Namespace project
Object Type "issue"
Object ID issue

Please see Access Control for details.