@procedures/gh 0.0.0-stage → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/LICENSE +21 -0
- package/README.md +51 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/module.d.ts +18 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +101 -0
- package/dist/module.js.map +1 -0
- package/dist/procedures/gh/index.d.ts +14 -0
- package/dist/procedures/gh/index.d.ts.map +1 -0
- package/dist/procedures/gh/index.js +14 -0
- package/dist/procedures/gh/index.js.map +1 -0
- package/dist/procedures/gh/issue/comment.d.ts +12 -0
- package/dist/procedures/gh/issue/comment.d.ts.map +1 -0
- package/dist/procedures/gh/issue/comment.js +14 -0
- package/dist/procedures/gh/issue/comment.js.map +1 -0
- package/dist/procedures/gh/issue/create.d.ts +12 -0
- package/dist/procedures/gh/issue/create.d.ts.map +1 -0
- package/dist/procedures/gh/issue/create.js +17 -0
- package/dist/procedures/gh/issue/create.js.map +1 -0
- package/dist/procedures/gh/issue/list.d.ts +12 -0
- package/dist/procedures/gh/issue/list.d.ts.map +1 -0
- package/dist/procedures/gh/issue/list.js +19 -0
- package/dist/procedures/gh/issue/list.js.map +1 -0
- package/dist/procedures/gh/issue/view.d.ts +12 -0
- package/dist/procedures/gh/issue/view.d.ts.map +1 -0
- package/dist/procedures/gh/issue/view.js +15 -0
- package/dist/procedures/gh/issue/view.js.map +1 -0
- package/dist/procedures/gh/pr/checks.d.ts +12 -0
- package/dist/procedures/gh/pr/checks.d.ts.map +1 -0
- package/dist/procedures/gh/pr/checks.js +23 -0
- package/dist/procedures/gh/pr/checks.js.map +1 -0
- package/dist/procedures/gh/pr/create.d.ts +12 -0
- package/dist/procedures/gh/pr/create.d.ts.map +1 -0
- package/dist/procedures/gh/pr/create.js +21 -0
- package/dist/procedures/gh/pr/create.js.map +1 -0
- package/dist/procedures/gh/pr/list.d.ts +13 -0
- package/dist/procedures/gh/pr/list.d.ts.map +1 -0
- package/dist/procedures/gh/pr/list.js +21 -0
- package/dist/procedures/gh/pr/list.js.map +1 -0
- package/dist/procedures/gh/pr/view.d.ts +12 -0
- package/dist/procedures/gh/pr/view.d.ts.map +1 -0
- package/dist/procedures/gh/pr/view.js +15 -0
- package/dist/procedures/gh/pr/view.js.map +1 -0
- package/dist/procedures/gh/release/list.d.ts +12 -0
- package/dist/procedures/gh/release/list.d.ts.map +1 -0
- package/dist/procedures/gh/release/list.js +14 -0
- package/dist/procedures/gh/release/list.js.map +1 -0
- package/dist/procedures/gh/release/view.d.ts +12 -0
- package/dist/procedures/gh/release/view.d.ts.map +1 -0
- package/dist/procedures/gh/release/view.js +16 -0
- package/dist/procedures/gh/release/view.js.map +1 -0
- package/dist/procedures/gh/run/list.d.ts +12 -0
- package/dist/procedures/gh/run/list.d.ts.map +1 -0
- package/dist/procedures/gh/run/list.js +21 -0
- package/dist/procedures/gh/run/list.js.map +1 -0
- package/dist/procedures/gh/run/rerun.d.ts +12 -0
- package/dist/procedures/gh/run/rerun.d.ts.map +1 -0
- package/dist/procedures/gh/run/rerun.js +17 -0
- package/dist/procedures/gh/run/rerun.js.map +1 -0
- package/dist/procedures/gh/run/view.d.ts +12 -0
- package/dist/procedures/gh/run/view.d.ts.map +1 -0
- package/dist/procedures/gh/run/view.js +15 -0
- package/dist/procedures/gh/run/view.js.map +1 -0
- package/dist/procedures/gh/shared.d.ts +30 -0
- package/dist/procedures/gh/shared.d.ts.map +1 -0
- package/dist/procedures/gh/shared.js +63 -0
- package/dist/procedures/gh/shared.js.map +1 -0
- package/dist/register.d.ts +6 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +8 -0
- package/dist/register.js.map +1 -0
- package/dist/types.d.ts +108 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +78 -3
- package/src/index.ts +3 -0
- package/src/module.ts +167 -0
- package/src/procedures/gh/index.ts +13 -0
- package/src/procedures/gh/issue/comment.ts +17 -0
- package/src/procedures/gh/issue/create.ts +19 -0
- package/src/procedures/gh/issue/list.ts +21 -0
- package/src/procedures/gh/issue/view.ts +19 -0
- package/src/procedures/gh/pr/checks.ts +25 -0
- package/src/procedures/gh/pr/create.ts +21 -0
- package/src/procedures/gh/pr/list.ts +22 -0
- package/src/procedures/gh/pr/view.ts +19 -0
- package/src/procedures/gh/release/list.ts +17 -0
- package/src/procedures/gh/release/view.ts +20 -0
- package/src/procedures/gh/run/list.ts +22 -0
- package/src/procedures/gh/run/rerun.ts +19 -0
- package/src/procedures/gh/run/view.ts +19 -0
- package/src/procedures/gh/shared.ts +75 -0
- package/src/register.ts +10 -0
- package/src/types.ts +124 -0
package/dist/module.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The procedures of @procedures/gh as data. Importing this file registers nothing.
|
|
3
|
+
*
|
|
4
|
+
* Each procedure runs the GitHub CLI (`gh`) through `shell.run`, with an argument list and no
|
|
5
|
+
* shell (roadmap R42). The reads declare `reads: ["network"]`. The procedures that make or change
|
|
6
|
+
* something on GitHub declare `writes: ["network"]`.
|
|
7
|
+
*
|
|
8
|
+
* Scaffold a procedure with: mark procedure new <name> --path packages/gh
|
|
9
|
+
*/
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
import { defineModule, registerModules, PROCEDURE_REGISTRY, createProcedure, zodAdapter } from "@procedures/client";
|
|
12
|
+
import shellModule from "@procedures/shell/module";
|
|
13
|
+
import { ghPrList } from "./procedures/gh/pr/list.js";
|
|
14
|
+
import { ghPrView } from "./procedures/gh/pr/view.js";
|
|
15
|
+
import { ghPrChecks } from "./procedures/gh/pr/checks.js";
|
|
16
|
+
import { ghPrCreate } from "./procedures/gh/pr/create.js";
|
|
17
|
+
import { ghRunList } from "./procedures/gh/run/list.js";
|
|
18
|
+
import { ghRunView } from "./procedures/gh/run/view.js";
|
|
19
|
+
import { ghRunRerun } from "./procedures/gh/run/rerun.js";
|
|
20
|
+
import { ghReleaseList } from "./procedures/gh/release/list.js";
|
|
21
|
+
import { ghReleaseView } from "./procedures/gh/release/view.js";
|
|
22
|
+
import { ghIssueList } from "./procedures/gh/issue/list.js";
|
|
23
|
+
import { ghIssueView } from "./procedures/gh/issue/view.js";
|
|
24
|
+
import { ghIssueCreate } from "./procedures/gh/issue/create.js";
|
|
25
|
+
import { ghIssueComment } from "./procedures/gh/issue/comment.js";
|
|
26
|
+
/** A read of GitHub: it changes nothing. */
|
|
27
|
+
const READS = { reads: ["network"], writes: [] };
|
|
28
|
+
/** A write to GitHub that makes something new: not destructive, and a second call makes a second one. */
|
|
29
|
+
const MAKES = { reads: ["network"], writes: ["network"], destructive: false, idempotent: false };
|
|
30
|
+
const common = {
|
|
31
|
+
repo: z.string().regex(/^[\w.-]+\/[\w.-]+$/, "owner/name").optional().describe("The repository as owner/name (default: the repository of the folder)"),
|
|
32
|
+
cwd: z.string().optional().describe("The folder where gh runs"),
|
|
33
|
+
timeoutMs: z.number().int().min(1).optional().describe("The time limit of the command, in milliseconds"),
|
|
34
|
+
};
|
|
35
|
+
const limit = z.number().int().min(1).max(1000).optional().describe("The most items (default 30)");
|
|
36
|
+
const list = z.object({ items: z.array(z.record(z.string(), z.unknown())).describe("The JSON objects that gh gives") });
|
|
37
|
+
const item = z.object({ item: z.record(z.string(), z.unknown()).describe("The JSON object that gh gives") });
|
|
38
|
+
const created = z.object({ url: z.string().describe("The URL of what gh made") });
|
|
39
|
+
/** One procedure of this package. Each one runs gh through shell.run, and declares it. */
|
|
40
|
+
function gh(path, description, input, output, effects, handler, args = []) {
|
|
41
|
+
return createProcedure()
|
|
42
|
+
.path(path)
|
|
43
|
+
.input(zodAdapter(input))
|
|
44
|
+
.output(zodAdapter(output))
|
|
45
|
+
.meta({ description, args, shorts: {}, output: "json", effects, calls: ["shell.run"] })
|
|
46
|
+
.handler(handler)
|
|
47
|
+
.build();
|
|
48
|
+
}
|
|
49
|
+
const procedures = [
|
|
50
|
+
gh(["gh", "pr", "list"], "The pull requests of a repository", z.object({
|
|
51
|
+
...common,
|
|
52
|
+
state: z.enum(["open", "closed", "merged", "all"]).optional().describe("The state (default open)"),
|
|
53
|
+
author: z.string().optional().describe("Only the pull requests of this author"),
|
|
54
|
+
base: z.string().optional().describe("Only the pull requests into this branch"),
|
|
55
|
+
head: z.string().optional().describe("Only the pull requests from this branch"),
|
|
56
|
+
search: z.string().optional().describe("A search of GitHub"),
|
|
57
|
+
limit,
|
|
58
|
+
}), list, READS, ghPrList),
|
|
59
|
+
gh(["gh", "pr", "view"], "One pull request", z.object({ ...common, pr: z.string().min(1).describe("The number, the branch or the URL of the pull request") }), item, READS, ghPrView, ["pr"]),
|
|
60
|
+
gh(["gh", "pr", "checks"], "The checks of a pull request", z.object({ ...common, pr: z.string().min(1).describe("The number, the branch or the URL of the pull request") }), list, READS, ghPrChecks, ["pr"]),
|
|
61
|
+
gh(["gh", "pr", "create"], "Open a pull request", z.object({
|
|
62
|
+
...common,
|
|
63
|
+
title: z.string().min(1).describe("The title"),
|
|
64
|
+
body: z.string().describe("The text of the pull request"),
|
|
65
|
+
base: z.string().optional().describe("The branch to merge into (default: the default branch)"),
|
|
66
|
+
head: z.string().optional().describe("The branch with the changes (default: the current branch)"),
|
|
67
|
+
draft: z.boolean().optional().describe("Open it as a draft"),
|
|
68
|
+
}), created, MAKES, ghPrCreate),
|
|
69
|
+
gh(["gh", "run", "list"], "The workflow runs of a repository", z.object({
|
|
70
|
+
...common,
|
|
71
|
+
workflow: z.string().optional().describe("The name or the file of a workflow"),
|
|
72
|
+
branch: z.string().optional().describe("Only the runs of this branch"),
|
|
73
|
+
status: z.string().optional().describe("Only the runs with this status, for example completed or failure"),
|
|
74
|
+
limit: z.number().int().min(1).max(1000).optional().describe("The most runs (default 20)"),
|
|
75
|
+
}), list, READS, ghRunList),
|
|
76
|
+
gh(["gh", "run", "view"], "One workflow run with its jobs", z.object({ ...common, run: z.number().int().min(1).describe("The id of the run") }), item, READS, ghRunView, ["run"]),
|
|
77
|
+
gh(["gh", "run", "rerun"], "Run a workflow run again", z.object({ ...common, run: z.number().int().min(1).describe("The id of the run"), failedOnly: z.boolean().optional().describe("Only the jobs that failed") }), z.object({ run: z.number().describe("The id of the run") }), MAKES, ghRunRerun, ["run"]),
|
|
78
|
+
gh(["gh", "release", "list"], "The releases of a repository", z.object({ ...common, limit }), list, READS, ghReleaseList),
|
|
79
|
+
gh(["gh", "release", "view"], "One release: the release of a tag, or the latest release", z.object({ ...common, tag: z.string().optional().describe("The tag (default: the latest release)") }), item, READS, ghReleaseView, ["tag"]),
|
|
80
|
+
gh(["gh", "issue", "list"], "The issues of a repository", z.object({
|
|
81
|
+
...common,
|
|
82
|
+
state: z.enum(["open", "closed", "all"]).optional().describe("The state (default open)"),
|
|
83
|
+
label: z.string().optional().describe("Only the issues with this label"),
|
|
84
|
+
author: z.string().optional().describe("Only the issues of this author"),
|
|
85
|
+
search: z.string().optional().describe("A search of GitHub"),
|
|
86
|
+
limit,
|
|
87
|
+
}), list, READS, ghIssueList),
|
|
88
|
+
gh(["gh", "issue", "view"], "One issue, with its comments", z.object({ ...common, issue: z.string().min(1).describe("The number or the URL of the issue") }), item, READS, ghIssueView, ["issue"]),
|
|
89
|
+
gh(["gh", "issue", "create"], "Open an issue", z.object({ ...common, title: z.string().min(1).describe("The title"), body: z.string().describe("The text of the issue"), labels: z.array(z.string()).optional().describe("The labels") }), created, MAKES, ghIssueCreate),
|
|
90
|
+
gh(["gh", "issue", "comment"], "Add a comment to an issue or a pull request", z.object({ ...common, issue: z.string().min(1).describe("The number or the URL of the issue or the pull request"), body: z.string().min(1).describe("The text of the comment") }), created, MAKES, ghIssueComment, ["issue"]),
|
|
91
|
+
];
|
|
92
|
+
export const ghModule = defineModule("@procedures/gh", procedures, [shellModule]);
|
|
93
|
+
export default ghModule;
|
|
94
|
+
/**
|
|
95
|
+
* This function registers the procedures of @procedures/gh in a registry. The default is the
|
|
96
|
+
* global registry.
|
|
97
|
+
*/
|
|
98
|
+
export function registerGhProcedures(registry = PROCEDURE_REGISTRY) {
|
|
99
|
+
registerModules(registry, [ghModule]);
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAiF,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACnM,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,4CAA4C;AAC5C,MAAM,KA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M,CAAC,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,wDAAwD,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,CAAC,EACjL,OAAO,EACP,KAAK,EACL,cAAc,EACd,CAAC,OAAO,CAAC,CACV;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAoB,YAAY,CAAC,gBAAgB,EAAE,UAAU,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;AAEnG,eAAe,QAAQ,CAAC;AAExB;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAQ,GAAsB,kBAAkB;IACnF,eAAe,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { ghPrList } from "./pr/list.js";
|
|
2
|
+
export { ghPrView } from "./pr/view.js";
|
|
3
|
+
export { ghPrChecks } from "./pr/checks.js";
|
|
4
|
+
export { ghPrCreate } from "./pr/create.js";
|
|
5
|
+
export { ghRunList } from "./run/list.js";
|
|
6
|
+
export { ghRunView } from "./run/view.js";
|
|
7
|
+
export { ghRunRerun } from "./run/rerun.js";
|
|
8
|
+
export { ghReleaseList } from "./release/list.js";
|
|
9
|
+
export { ghReleaseView } from "./release/view.js";
|
|
10
|
+
export { ghIssueList } from "./issue/list.js";
|
|
11
|
+
export { ghIssueView } from "./issue/view.js";
|
|
12
|
+
export { ghIssueCreate } from "./issue/create.js";
|
|
13
|
+
export { ghIssueComment } from "./issue/comment.js";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/procedures/gh/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { ghPrList } from "./pr/list.js";
|
|
2
|
+
export { ghPrView } from "./pr/view.js";
|
|
3
|
+
export { ghPrChecks } from "./pr/checks.js";
|
|
4
|
+
export { ghPrCreate } from "./pr/create.js";
|
|
5
|
+
export { ghRunList } from "./run/list.js";
|
|
6
|
+
export { ghRunView } from "./run/view.js";
|
|
7
|
+
export { ghRunRerun } from "./run/rerun.js";
|
|
8
|
+
export { ghReleaseList } from "./release/list.js";
|
|
9
|
+
export { ghReleaseView } from "./release/view.js";
|
|
10
|
+
export { ghIssueList } from "./issue/list.js";
|
|
11
|
+
export { ghIssueView } from "./issue/view.js";
|
|
12
|
+
export { ghIssueCreate } from "./issue/create.js";
|
|
13
|
+
export { ghIssueComment } from "./issue/comment.js";
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/procedures/gh/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.issue.comment procedure
|
|
3
|
+
*
|
|
4
|
+
* Add a comment to an issue or a pull request
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhIssueCommentInput, GhIssueCommentOutput } from "../../../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Add a comment to an issue or a pull request
|
|
10
|
+
*/
|
|
11
|
+
export declare function ghIssueComment(input: GhIssueCommentInput, ctx: ProcedureContext): Promise<GhIssueCommentOutput>;
|
|
12
|
+
//# sourceMappingURL=comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/issue/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAGnF;;GAEG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAGrH"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.issue.comment procedure
|
|
3
|
+
*
|
|
4
|
+
* Add a comment to an issue or a pull request
|
|
5
|
+
*/
|
|
6
|
+
import { ghArg, repoArgs, runGh, urlOf } from "../shared.js";
|
|
7
|
+
/**
|
|
8
|
+
* Add a comment to an issue or a pull request
|
|
9
|
+
*/
|
|
10
|
+
export async function ghIssueComment(input, ctx) {
|
|
11
|
+
const args = ["issue", "comment", ghArg("issue", input.issue), "--body", input.body, ...repoArgs(input)];
|
|
12
|
+
return { url: urlOf(await runGh(args, input, ctx)) };
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../../src/procedures/gh/issue/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAA0B,EAAE,GAAqB;IACpF,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACzG,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.issue.create procedure
|
|
3
|
+
*
|
|
4
|
+
* Open an issue
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhIssueCreateInput, GhIssueCreateOutput } from "../../../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Open an issue
|
|
10
|
+
*/
|
|
11
|
+
export declare function ghIssueCreate(input: GhIssueCreateInput, ctx: ProcedureContext): Promise<GhIssueCreateOutput>;
|
|
12
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/issue/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGjF;;GAEG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAKlH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.issue.create procedure
|
|
3
|
+
*
|
|
4
|
+
* Open an issue
|
|
5
|
+
*/
|
|
6
|
+
import { ghArg, repoArgs, runGh, urlOf } from "../shared.js";
|
|
7
|
+
/**
|
|
8
|
+
* Open an issue
|
|
9
|
+
*/
|
|
10
|
+
export async function ghIssueCreate(input, ctx) {
|
|
11
|
+
// --title and --body take their value as the next argument, so a value that starts with "-" is text
|
|
12
|
+
const args = ["issue", "create", "--title", input.title, "--body", input.body, ...repoArgs(input)];
|
|
13
|
+
for (const label of input.labels ?? [])
|
|
14
|
+
args.push("--label", ghArg("label", label));
|
|
15
|
+
return { url: urlOf(await runGh(args, input, ctx)) };
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/procedures/gh/issue/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAyB,EAAE,GAAqB;IAClF,oGAAoG;IACpG,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACnG,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,EAAE;QAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;IACpF,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.issue.list procedure
|
|
3
|
+
*
|
|
4
|
+
* The issues of a repository
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhIssueListInput, GhIssueListOutput } from "../../../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* The issues of a repository
|
|
10
|
+
*/
|
|
11
|
+
export declare function ghIssueList(input: GhIssueListInput, ctx: ProcedureContext): Promise<GhIssueListOutput>;
|
|
12
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/issue/list.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK7E;;GAEG;AACH,wBAAsB,WAAW,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAK5G"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.issue.list procedure
|
|
3
|
+
*
|
|
4
|
+
* The issues of a repository
|
|
5
|
+
*/
|
|
6
|
+
import { ghArg, ghJson, listArgs, repoArgs } from "../shared.js";
|
|
7
|
+
const FIELDS = "number,title,state,url,author,labels,assignees,createdAt,updatedAt";
|
|
8
|
+
/**
|
|
9
|
+
* The issues of a repository
|
|
10
|
+
*/
|
|
11
|
+
export async function ghIssueList(input, ctx) {
|
|
12
|
+
const args = ["issue", "list", "--json", FIELDS, "--state", input.state ?? "open", ...listArgs(input), ...repoArgs(input)];
|
|
13
|
+
if (input.label !== undefined)
|
|
14
|
+
args.push("--label", ghArg("label", input.label));
|
|
15
|
+
if (input.author !== undefined)
|
|
16
|
+
args.push("--author", ghArg("author", input.author));
|
|
17
|
+
return { items: await ghJson(args, input, ctx) };
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/procedures/gh/issue/list.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEjE,MAAM,MAAM,GAAG,oEAAoE,CAAC;AAEpF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,KAAuB,EAAE,GAAqB;IAC9E,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,IAAI,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3H,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACjF,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACrF,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAiC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.issue.view procedure
|
|
3
|
+
*
|
|
4
|
+
* One issue, with its comments
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhIssueViewInput, GhIssueViewOutput } from "../../../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* One issue
|
|
10
|
+
*/
|
|
11
|
+
export declare function ghIssueView(input: GhIssueViewInput, ctx: ProcedureContext): Promise<GhIssueViewOutput>;
|
|
12
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/issue/view.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK7E;;GAEG;AACH,wBAAsB,WAAW,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAG5G"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.issue.view procedure
|
|
3
|
+
*
|
|
4
|
+
* One issue, with its comments
|
|
5
|
+
*/
|
|
6
|
+
import { ghArg, ghJson, repoArgs } from "../shared.js";
|
|
7
|
+
const FIELDS = "number,title,state,url,body,author,labels,assignees,comments,createdAt,updatedAt";
|
|
8
|
+
/**
|
|
9
|
+
* One issue
|
|
10
|
+
*/
|
|
11
|
+
export async function ghIssueView(input, ctx) {
|
|
12
|
+
const args = ["issue", "view", ghArg("issue", input.issue), "--json", FIELDS, ...repoArgs(input)];
|
|
13
|
+
return { item: await ghJson(args, input, ctx) };
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../src/procedures/gh/issue/view.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,MAAM,GAAG,kFAAkF,CAAC;AAElG;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,KAAuB,EAAE,GAAqB;IAC9E,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAClG,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAA0B,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.pr.checks procedure
|
|
3
|
+
*
|
|
4
|
+
* The checks of a pull request. gh exits with 8 while a check runs: that is a result, not a failure.
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhPrChecksInput, GhPrChecksOutput } from "../../../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* The checks of a pull request
|
|
10
|
+
*/
|
|
11
|
+
export declare function ghPrChecks(input: GhPrChecksInput, ctx: ProcedureContext): Promise<GhPrChecksOutput>;
|
|
12
|
+
//# sourceMappingURL=checks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/pr/checks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG3E;;GAEG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAWzG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.pr.checks procedure
|
|
3
|
+
*
|
|
4
|
+
* The checks of a pull request. gh exits with 8 while a check runs: that is a result, not a failure.
|
|
5
|
+
*/
|
|
6
|
+
import { GhError, ghArg, ghJson, repoArgs } from "../shared.js";
|
|
7
|
+
/**
|
|
8
|
+
* The checks of a pull request
|
|
9
|
+
*/
|
|
10
|
+
export async function ghPrChecks(input, ctx) {
|
|
11
|
+
const args = ["pr", "checks", ghArg("pr", input.pr), "--json", "name,state,bucket,link,workflow", ...repoArgs(input)];
|
|
12
|
+
try {
|
|
13
|
+
return { items: await ghJson(args, input, ctx) };
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
// Exit 8: a check is pending. gh still prints the JSON on stdout, but runGh threw on the exit code
|
|
17
|
+
if (error instanceof GhError && error.exitCode === 8) {
|
|
18
|
+
throw new GhError("gh pr checks: a check is pending, ask again later", 8, error.stderr);
|
|
19
|
+
}
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=checks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checks.js","sourceRoot":"","sources":["../../../../src/procedures/gh/pr/checks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEhE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,KAAsB,EAAE,GAAqB;IAC5E,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,iCAAiC,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACtH,IAAI,CAAC;QACH,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAiC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;IACnF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,mGAAmG;QACnG,IAAI,KAAK,YAAY,OAAO,IAAI,KAAK,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YACrD,MAAM,IAAI,OAAO,CAAC,mDAAmD,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC1F,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.pr.create procedure
|
|
3
|
+
*
|
|
4
|
+
* Open a pull request
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhPrCreateInput, GhPrCreateOutput } from "../../../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Open a pull request
|
|
10
|
+
*/
|
|
11
|
+
export declare function ghPrCreate(input: GhPrCreateInput, ctx: ProcedureContext): Promise<GhPrCreateOutput>;
|
|
12
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/pr/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG3E;;GAEG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAOzG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.pr.create procedure
|
|
3
|
+
*
|
|
4
|
+
* Open a pull request
|
|
5
|
+
*/
|
|
6
|
+
import { ghArg, repoArgs, runGh, urlOf } from "../shared.js";
|
|
7
|
+
/**
|
|
8
|
+
* Open a pull request
|
|
9
|
+
*/
|
|
10
|
+
export async function ghPrCreate(input, ctx) {
|
|
11
|
+
// --title and --body take their value as the next argument, so a value that starts with "-" is text
|
|
12
|
+
const args = ["pr", "create", "--title", input.title, "--body", input.body, ...repoArgs(input)];
|
|
13
|
+
if (input.base !== undefined)
|
|
14
|
+
args.push("--base", ghArg("base", input.base));
|
|
15
|
+
if (input.head !== undefined)
|
|
16
|
+
args.push("--head", ghArg("head", input.head));
|
|
17
|
+
if (input.draft)
|
|
18
|
+
args.push("--draft");
|
|
19
|
+
return { url: urlOf(await runGh(args, input, ctx)) };
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/procedures/gh/pr/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,KAAsB,EAAE,GAAqB;IAC5E,oGAAoG;IACpG,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAChG,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,IAAI,KAAK,CAAC,KAAK;QAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.pr.list procedure
|
|
3
|
+
*
|
|
4
|
+
* The pull requests of a repository
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhPrListInput, GhPrListOutput } from "../../../types.js";
|
|
8
|
+
export declare const PR_FIELDS = "number,title,state,url,author,headRefName,baseRefName,isDraft,createdAt,updatedAt";
|
|
9
|
+
/**
|
|
10
|
+
* The pull requests of a repository
|
|
11
|
+
*/
|
|
12
|
+
export declare function ghPrList(input: GhPrListInput, ctx: ProcedureContext): Promise<GhPrListOutput>;
|
|
13
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/pr/list.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGvE,eAAO,MAAM,SAAS,sFAAsF,CAAC;AAE7G;;GAEG;AACH,wBAAsB,QAAQ,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,CAMnG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.pr.list procedure
|
|
3
|
+
*
|
|
4
|
+
* The pull requests of a repository
|
|
5
|
+
*/
|
|
6
|
+
import { ghArg, ghJson, listArgs, repoArgs } from "../shared.js";
|
|
7
|
+
export const PR_FIELDS = "number,title,state,url,author,headRefName,baseRefName,isDraft,createdAt,updatedAt";
|
|
8
|
+
/**
|
|
9
|
+
* The pull requests of a repository
|
|
10
|
+
*/
|
|
11
|
+
export async function ghPrList(input, ctx) {
|
|
12
|
+
const args = ["pr", "list", "--json", PR_FIELDS, "--state", input.state ?? "open", ...listArgs(input), ...repoArgs(input)];
|
|
13
|
+
if (input.author !== undefined)
|
|
14
|
+
args.push("--author", ghArg("author", input.author));
|
|
15
|
+
if (input.base !== undefined)
|
|
16
|
+
args.push("--base", ghArg("base", input.base));
|
|
17
|
+
if (input.head !== undefined)
|
|
18
|
+
args.push("--head", ghArg("head", input.head));
|
|
19
|
+
return { items: await ghJson(args, input, ctx) };
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/procedures/gh/pr/list.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEjE,MAAM,CAAC,MAAM,SAAS,GAAG,mFAAmF,CAAC;AAE7G;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,KAAoB,EAAE,GAAqB;IACxE,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,IAAI,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3H,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACrF,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAiC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.pr.view procedure
|
|
3
|
+
*
|
|
4
|
+
* One pull request
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhPrViewInput, GhPrViewOutput } from "../../../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* One pull request
|
|
10
|
+
*/
|
|
11
|
+
export declare function ghPrView(input: GhPrViewInput, ctx: ProcedureContext): Promise<GhPrViewOutput>;
|
|
12
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/pr/view.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKvE;;GAEG;AACH,wBAAsB,QAAQ,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,CAGnG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.pr.view procedure
|
|
3
|
+
*
|
|
4
|
+
* One pull request
|
|
5
|
+
*/
|
|
6
|
+
import { ghArg, ghJson, repoArgs } from "../shared.js";
|
|
7
|
+
const FIELDS = "number,title,state,url,body,author,headRefName,baseRefName,isDraft,mergeable,reviewDecision,additions,deletions,changedFiles,createdAt,updatedAt";
|
|
8
|
+
/**
|
|
9
|
+
* One pull request
|
|
10
|
+
*/
|
|
11
|
+
export async function ghPrView(input, ctx) {
|
|
12
|
+
const args = ["pr", "view", ghArg("pr", input.pr), "--json", FIELDS, ...repoArgs(input)];
|
|
13
|
+
return { item: await ghJson(args, input, ctx) };
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../src/procedures/gh/pr/view.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,MAAM,GAAG,kJAAkJ,CAAC;AAElK;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,KAAoB,EAAE,GAAqB;IACxE,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACzF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAA0B,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.release.list procedure
|
|
3
|
+
*
|
|
4
|
+
* The releases of a repository
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhReleaseListInput, GhReleaseListOutput } from "../../../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* The releases of a repository
|
|
10
|
+
*/
|
|
11
|
+
export declare function ghReleaseList(input: GhReleaseListInput, ctx: ProcedureContext): Promise<GhReleaseListOutput>;
|
|
12
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/release/list.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGjF;;GAEG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAGlH"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.release.list procedure
|
|
3
|
+
*
|
|
4
|
+
* The releases of a repository
|
|
5
|
+
*/
|
|
6
|
+
import { ghJson, listArgs, repoArgs } from "../shared.js";
|
|
7
|
+
/**
|
|
8
|
+
* The releases of a repository
|
|
9
|
+
*/
|
|
10
|
+
export async function ghReleaseList(input, ctx) {
|
|
11
|
+
const args = ["release", "list", "--json", "tagName,name,isDraft,isPrerelease,isLatest,publishedAt,createdAt", ...listArgs(input), ...repoArgs(input)];
|
|
12
|
+
return { items: await ghJson(args, input, ctx) };
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/procedures/gh/release/list.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAyB,EAAE,GAAqB;IAClF,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,kEAAkE,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACvJ,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAiC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.release.view procedure
|
|
3
|
+
*
|
|
4
|
+
* One release: the release of a tag, or the latest release
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhReleaseViewInput, GhReleaseViewOutput } from "../../../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* One release
|
|
10
|
+
*/
|
|
11
|
+
export declare function ghReleaseView(input: GhReleaseViewInput, ctx: ProcedureContext): Promise<GhReleaseViewOutput>;
|
|
12
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/release/view.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAKjF;;GAEG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAIlH"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.release.view procedure
|
|
3
|
+
*
|
|
4
|
+
* One release: the release of a tag, or the latest release
|
|
5
|
+
*/
|
|
6
|
+
import { ghArg, ghJson, repoArgs } from "../shared.js";
|
|
7
|
+
const FIELDS = "tagName,name,body,url,isDraft,isPrerelease,publishedAt,createdAt,author,assets";
|
|
8
|
+
/**
|
|
9
|
+
* One release
|
|
10
|
+
*/
|
|
11
|
+
export async function ghReleaseView(input, ctx) {
|
|
12
|
+
const tag = input.tag === undefined ? [] : [ghArg("tag", input.tag)];
|
|
13
|
+
const args = ["release", "view", ...tag, "--json", FIELDS, ...repoArgs(input)];
|
|
14
|
+
return { item: await ghJson(args, input, ctx) };
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../src/procedures/gh/release/view.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,MAAM,GAAG,gFAAgF,CAAC;AAEhG;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAyB,EAAE,GAAqB;IAClF,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACrE,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAA0B,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.run.list procedure
|
|
3
|
+
*
|
|
4
|
+
* The workflow runs of a repository
|
|
5
|
+
*/
|
|
6
|
+
import type { ProcedureContext } from "@procedures/client";
|
|
7
|
+
import type { GhRunListInput, GhRunListOutput } from "../../../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* The workflow runs of a repository
|
|
10
|
+
*/
|
|
11
|
+
export declare function ghRunList(input: GhRunListInput, ctx: ProcedureContext): Promise<GhRunListOutput>;
|
|
12
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/procedures/gh/run/list.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKzE;;GAEG;AACH,wBAAsB,SAAS,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAMtG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gh.run.list procedure
|
|
3
|
+
*
|
|
4
|
+
* The workflow runs of a repository
|
|
5
|
+
*/
|
|
6
|
+
import { ghArg, ghJson, listArgs, repoArgs } from "../shared.js";
|
|
7
|
+
const FIELDS = "databaseId,workflowName,displayTitle,headBranch,headSha,event,status,conclusion,url,createdAt,updatedAt";
|
|
8
|
+
/**
|
|
9
|
+
* The workflow runs of a repository
|
|
10
|
+
*/
|
|
11
|
+
export async function ghRunList(input, ctx) {
|
|
12
|
+
const args = ["run", "list", "--json", FIELDS, ...listArgs({ limit: input.limit ?? 20 }), ...repoArgs(input)];
|
|
13
|
+
if (input.workflow !== undefined)
|
|
14
|
+
args.push("--workflow", ghArg("workflow", input.workflow));
|
|
15
|
+
if (input.branch !== undefined)
|
|
16
|
+
args.push("--branch", ghArg("branch", input.branch));
|
|
17
|
+
if (input.status !== undefined)
|
|
18
|
+
args.push("--status", ghArg("status", input.status));
|
|
19
|
+
return { items: await ghJson(args, input, ctx) };
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=list.js.map
|