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","pr","create"], { title: "<title>", body: "<body>" });
console.log(JSON.stringify(result));From the command line
$ mark gh pr create --title <string> --body <string>
As data, in a program
{
"$proc": ["gh", "pr", "create"],
"input": { "title": "<title>", "body": "<body>" }
}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 pull request"
},
"base": {
"description": "The branch to merge into (default: the default branch)",
"type": "string"
},
"head": {
"description": "The branch with the changes (default: the current branch)",
"type": "string"
},
"draft": {
"description": "Open it as a draft",
"type": "boolean"
}
},
"required": [
"title",
"body"
]
},
"output": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL of what gh made"
}
},
"required": [
"url"
],
"additionalProperties": false
}
}