Skip to content

github create-issue

Create github issue

Description

Create github issue

Synopsis

github create-issue
    [--site <site>]
    --repo <repo>
    --title <title>
    [--body <body>]
    [--milestone <milestone>]
    [--labels <labels>]
    [--assignees <assignees>]

Arguments

site - (string)

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

repo - (string)

     Fully Qualified Repository Name for issue
     Example: --repo "github_user1/test_repo_1"
     Default: _None_      Attributes: required

title - (string)

     The title of the issue
     Example: --title "Write a user facing document on how to create new integration and commands"
     Default: _None_      Attributes: required

body - (string)

     The contents of the issue.
     Example: --body "This document should be single place to get started and contribute integrations for the open source community"
     Default: _None_      Attributes: optional

milestone - (string)

     The number of the milestone to associate this issue with.
     Example: --milestone "milestone1"
     Default: _None_      Attributes: optional

labels - (string)

     Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ([]) to clear all Labels from the Issue.
     Example: --labels "bug/ui/@high"
     Default: _None_      Attributes: optional, multiple allowed

assignees - (string)

     Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue.
     Example: --assignees "assignee"
     Default: _None_      Attributes: optional, multiple allowed

Examples

Input:

x=! github create-issue --title "testTitle1" --cluster "github-default" --repo "prabhsimran-beehyv/testRepo"
Output:
{
  "url": "https://api.github.com/repos/prabhsimran-beehyv/testRepo/issues/1",
  "repository_url": "https://api.github.com/repos/prabhsimran-beehyv/testRepo",
  "labels_url": "https://api.github.com/repos/prabhsimran-beehyv/testRepo/issues/1/labels{/name}",
  "comments_url": "https://api.github.com/repos/prabhsimran-beehyv/testRepo/issues/1/comments",
  "events_url": "https://api.github.com/repos/prabhsimran-beehyv/testRepo/issues/1/events",
  "html_url": "https://github.com/prabhsimran-beehyv/testRepo/issues/1",
  "id": 1170705310,
  "node_id": "I_kwDOHAspuM5Fx4ue",
  "number": 1,
  "title": "testTitle1",
  "user": {
    "login": "prabhsimran-beehyv",
    "id": 100373722,
    "node_id": "U_kgDOBfuU2g",
    "avatar_url": "https://avatars.githubusercontent.com/u/100373722?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/prabhsimran-beehyv",
    "html_url": "https://github.com/prabhsimran-beehyv",
    "followers_url": "https://api.github.com/users/prabhsimran-beehyv/followers",
    "following_url": "https://api.github.com/users/prabhsimran-beehyv/following{/other_user}",
    "gists_url": "https://api.github.com/users/prabhsimran-beehyv/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/prabhsimran-beehyv/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/prabhsimran-beehyv/subscriptions",
    "organizations_url": "https://api.github.com/users/prabhsimran-beehyv/orgs",
    "repos_url": "https://api.github.com/users/prabhsimran-beehyv/repos",
    "events_url": "https://api.github.com/users/prabhsimran-beehyv/events{/privacy}",
    "received_events_url": "https://api.github.com/users/prabhsimran-beehyv/received_events",
    "type": "User",
    "site_admin": false
  },
  "labels": [],
  "state": "open",
  "locked": false,
  "assignee": null,
  "assignees": [],
  "milestone": null,
  "comments": 0,
  "created_at": "2022-03-16T08:39:31Z",
  "updated_at": "2022-03-16T08:39:31Z",
  "closed_at": null,
  "author_association": "OWNER",
  "active_lock_reason": null,
  "body": null,
  "closed_by": null,
  "reactions": {
    "url": "https://api.github.com/repos/prabhsimran-beehyv/testRepo/issues/1/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
  },
  "timeline_url": "https://api.github.com/repos/prabhsimran-beehyv/testRepo/issues/1/timeline",
  "performed_via_github_app": null
}
Input:
! github create-issue --title "testTitle1" --cluster "github-default" --repo "prabhsimran-beehyv/testRepo"
Output:
Issue number 1 created

Access Control

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

Field Value
Action "create"
Service Type "github"
Service Instance
Namespace repo
Object Type "issue"
Object ID

Please see Access Control for details.