Skip to content

gitlab create-discussion

Create new discussion for gitlab issue

Description

Create new discussion for gitlab issue

Synopsis

gitlab create-discussion
    [--site <site>]
    --project <project>
    --issue <issue>
    <body>
    [--created_at <created_at>]

Arguments

site - (string)

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

project - (string)

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

issue - (integer)

     The IID of an issue
     Example: --issue "1"
     Default: _None_      Attributes: required

body - (string)

     The content of the thread
     Example: "discussion_here"
     Default: _None_      Attributes: required

created_at - (time)

     time at which issue was created
     Example: --created_at "1 day ago"
     Default: _None_      Attributes: optional

Examples

Input:

x = ! gitlab create-discussion --project "saiprakash_maira/testing" --issue 4 "hello discussion 2"
Output:
{
  "id": "d92e0d28ff5fe5a407effb55aa6fe977b66d9e77",
  "individual_note": false,
  "notes": [
    {
      "id": 734515843,
      "type": "DiscussionNote",
      "body": "hello discussion 2",
      "attachment": null,
      "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"
      },
      "created_at": "2021-11-16T12:52:11.405Z",
      "updated_at": "2021-11-16T12:52:11.405Z",
      "system": false,
      "noteable_id": 97399269,
      "noteable_type": "Issue",
      "resolvable": false,
      "confidential": false,
      "noteable_iid": 4,
      "commands_changes": {}
    }
  ]
}

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

Please see Access Control for details.