← All procedures

gh.issue.create

Open an issue

CLI
Package
@procedures/gh · README
Path
["gh","issue","create"]
CLI
mark gh issue create --title <string> --body <string>
As data
{"$proc":["gh","issue","create"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/gh/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["gh","issue","create"], { title: "<title>", body: "<body>" });
console.log(JSON.stringify(result));

From the command line

$ mark gh issue create --title <string> --body <string>

As data, in a program

{
  "$proc": ["gh", "issue", "create"],
  "input": { "title": "<title>", "body": "<body>" }
}

Input

FieldTypeRequiredDefaultDescription
repostringnoThe repository as owner/name (default: the repository of the folder)
cwdstringnoThe folder where gh runs
timeoutMsintegernoThe time limit of the command, in milliseconds
titlestringyesThe title
bodystringyesThe text of the issue
labelsstring[]noThe labels

Output

FieldTypeRequiredDefaultDescription
urlstringyesThe URL of what gh made
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "repo": {
        "description": "The repository as owner/name (default: the repository of the folder)",
        "type": "string",
        "pattern": "^[\\w.-]+\\/[\\w.-]+$"
      },
      "cwd": {
        "description": "The folder where gh runs",
        "type": "string"
      },
      "timeoutMs": {
        "description": "The time limit of the command, in milliseconds",
        "type": "integer",
        "minimum": 1,
        "maximum": 9007199254740991
      },
      "title": {
        "type": "string",
        "minLength": 1,
        "description": "The title"
      },
      "body": {
        "type": "string",
        "description": "The text of the issue"
      },
      "labels": {
        "description": "The labels",
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    "required": [
      "title",
      "body"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "description": "The URL of what gh made"
      }
    },
    "required": [
      "url"
    ],
    "additionalProperties": false
  }
}