@neturely/okffs 0.6.0 → 0.7.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 +12 -1
- package/README.md +12 -6
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +37 -0
- package/dist/config.js.map +1 -1
- package/dist/git.d.ts +12 -0
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +31 -0
- package/dist/git.js.map +1 -1
- package/dist/github.d.ts +56 -0
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +46 -2
- package/dist/github.js.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/issue_types.d.ts +5 -0
- package/dist/issue_types.d.ts.map +1 -0
- package/dist/issue_types.js +65 -0
- package/dist/issue_types.js.map +1 -0
- package/dist/tools/create_issue.d.ts +3 -0
- package/dist/tools/create_issue.d.ts.map +1 -1
- package/dist/tools/create_issue.js +51 -41
- package/dist/tools/create_issue.js.map +1 -1
- package/dist/tools/create_issues_from_list.d.ts +6 -1
- package/dist/tools/create_issues_from_list.d.ts.map +1 -1
- package/dist/tools/create_issues_from_list.js +14 -1
- package/dist/tools/create_issues_from_list.js.map +1 -1
- package/dist/tools/create_pull_request.d.ts +4 -1
- package/dist/tools/create_pull_request.d.ts.map +1 -1
- package/dist/tools/create_pull_request.js +35 -8
- package/dist/tools/create_pull_request.js.map +1 -1
- package/dist/tools/list_issues.d.ts +1 -1
- package/dist/tools/list_issues.d.ts.map +1 -1
- package/dist/tools/list_issues.js +6 -1
- package/dist/tools/list_issues.js.map +1 -1
- package/dist/tools/merge_pull_request.d.ts +17 -0
- package/dist/tools/merge_pull_request.d.ts.map +1 -0
- package/dist/tools/merge_pull_request.js +142 -0
- package/dist/tools/merge_pull_request.js.map +1 -0
- package/dist/tools/plan.d.ts +6 -1
- package/dist/tools/plan.d.ts.map +1 -1
- package/dist/tools/plan.js +16 -1
- package/dist/tools/plan.js.map +1 -1
- package/dist/tools/set_issue_fields.d.ts +3 -0
- package/dist/tools/set_issue_fields.d.ts.map +1 -1
- package/dist/tools/set_issue_fields.js +40 -32
- package/dist/tools/set_issue_fields.js.map +1 -1
- package/dist/tools/update_issue.d.ts +32 -0
- package/dist/tools/update_issue.d.ts.map +1 -0
- package/dist/tools/update_issue.js +46 -0
- package/dist/tools/update_issue.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue_types.js","sourceRoot":"","sources":["../src/issue_types.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,6EAA6E;AAC7E,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,gFAAgF;AAChF,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,iFAAiF;AACjF,4DAA4D;AAE5D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,2EAA2E;AAC3E,2EAA2E;AAC3E,8EAA8E;AAC9E,wBAAwB;AACxB,IAAI,MAA8C,CAAC;AAEnD,gFAAgF;AAChF,sEAAsE;AACtE,MAAM,UAAU,iBAAiB;IAC/B,OAAO,MAAM,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACzD,CAAC;AAED,8EAA8E;AAC9E,gFAAgF;AAChF,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC;IAChC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,gBAAgB,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,I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G,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACpF,CAAC;AACH,CAAC"}
|
|
@@ -10,9 +10,11 @@ export declare const inputSchema: z.ZodObject<{
|
|
|
10
10
|
milestone: z.ZodOptional<z.ZodNumber>;
|
|
11
11
|
priority: z.ZodOptional<z.ZodString>;
|
|
12
12
|
effort: z.ZodOptional<z.ZodString>;
|
|
13
|
+
type: z.ZodOptional<z.ZodString>;
|
|
13
14
|
}, "strip", z.ZodTypeAny, {
|
|
14
15
|
title: string;
|
|
15
16
|
description: string;
|
|
17
|
+
type?: string | undefined;
|
|
16
18
|
priority?: string | undefined;
|
|
17
19
|
effort?: string | undefined;
|
|
18
20
|
assignees?: string[] | undefined;
|
|
@@ -21,6 +23,7 @@ export declare const inputSchema: z.ZodObject<{
|
|
|
21
23
|
}, {
|
|
22
24
|
title: string;
|
|
23
25
|
description: string;
|
|
26
|
+
type?: string | undefined;
|
|
24
27
|
priority?: string | undefined;
|
|
25
28
|
effort?: string | undefined;
|
|
26
29
|
assignees?: string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_issue.d.ts","sourceRoot":"","sources":["../../src/tools/create_issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"create_issue.d.ts","sourceRoot":"","sources":["../../src/tools/create_issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,IAAI,iBAAiB,CAAC;AAsCnC,eAAO,MAAM,WAAW,QAA4D,CAAC;AAOrF,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAYtD;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;EAetB,CAAC;AAEH,wBAAsB,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC;;;;;GAyJ/D"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { createIssue, updateIssueBody, getDefaultBranch, getRef, createBranch, buildBranchName, createDraftPullRequest } from "../github.js";
|
|
3
3
|
import { config } from "../config.js";
|
|
4
|
-
import {
|
|
4
|
+
import { pushEmptyInitCommit } from "../git.js";
|
|
5
5
|
import { boardAutoAddEnabled, addIssueToBoard, applyInitialStatus, renderBoardLines, getBoardFieldOptions, } from "../board.js";
|
|
6
|
+
import { applyIssueType, getIssueTypeNames } from "../issue_types.js";
|
|
6
7
|
export const name = "create_issue";
|
|
7
8
|
const DESCRIPTION_HEAD = "Create a GitHub issue and automatically create a matching branch. Before calling this tool, infer appropriate labels from the issue title and description using GitHub's default labels: bug, documentation, duplicate, enhancement, good first issue, help wanted, invalid, question, wontfix. Pass the inferred labels in the labels parameter unless the user has specified their own.";
|
|
8
9
|
const DESCRIPTION_TAIL = " If the user mentions that this issue is blocked by, blocking, or a child of another issue, call link_issues after creating this issue to set the relationship. Returns the issue URL, issue number, and branch name.";
|
|
9
|
-
// Priority/Effort inference guidance is woven into the tool description so
|
|
10
|
-
// uses its own judgement to triage the issue it's creating (like it already
|
|
11
|
-
// for labels), falling back to OKFFS_DEFAULT_* only when it can't tell. Toggle
|
|
12
|
-
// field with OKFFS_INFER_PRIORITY / OKFFS_INFER_EFFORT
|
|
13
|
-
// board's real option names
|
|
14
|
-
//
|
|
15
|
-
|
|
10
|
+
// Priority/Effort/Type inference guidance is woven into the tool description so
|
|
11
|
+
// Claude uses its own judgement to triage the issue it's creating (like it already
|
|
12
|
+
// does for labels), falling back to OKFFS_DEFAULT_* only when it can't tell. Toggle
|
|
13
|
+
// per field with OKFFS_INFER_PRIORITY / OKFFS_INFER_EFFORT / OKFFS_INFER_TYPE
|
|
14
|
+
// (default on). When the board's real option names / the org's real Issue Type
|
|
15
|
+
// names are known they replace the generic scale so Claude infers against the
|
|
16
|
+
// actual values (#133, #201) — e.g. a P0/P1/P2 board, or an org with Epic/Story.
|
|
17
|
+
function inferenceGuidance(priorityOpts, effortOpts, typeOpts) {
|
|
16
18
|
const bits = [];
|
|
17
19
|
if (config.inferPriority) {
|
|
18
20
|
const scale = priorityOpts?.length ? priorityOpts.join(", ") : "Urgent, High, Medium, Low";
|
|
@@ -22,30 +24,37 @@ function inferenceGuidance(priorityOpts, effortOpts) {
|
|
|
22
24
|
const scale = effortOpts?.length ? effortOpts.join(", ") : "High, Medium, Low";
|
|
23
25
|
bits.push(`infer an \`effort\` from the expected amount of work (board options: ${scale})`);
|
|
24
26
|
}
|
|
27
|
+
if (config.inferType) {
|
|
28
|
+
const scale = typeOpts?.length ? typeOpts.join(", ") : "Task, Bug, Feature";
|
|
29
|
+
bits.push(`infer a \`type\` — the native GitHub Issue Type — from what kind of work it is (org types: ${scale}; e.g. a fix → Bug, a new capability → Feature, a broad multi-issue effort → Epic, a small chore → Task)`);
|
|
30
|
+
}
|
|
25
31
|
if (bits.length === 0)
|
|
26
32
|
return "";
|
|
27
|
-
return (` Also ${bits.join(" and ")}, passing the value(s) in the matching parameter. ` +
|
|
28
|
-
"okffs matches these against the board's actual options and falls back to OKFFS_DEFAULT_PRIORITY / OKFFS_DEFAULT_EFFORT when you omit them — so if you genuinely can't judge, omit the field rather than guessing.");
|
|
33
|
+
return (` Also ${bits.join(", and ")}, passing the value(s) in the matching parameter. ` +
|
|
34
|
+
"okffs matches these against the board's / org's actual options and falls back to OKFFS_DEFAULT_PRIORITY / OKFFS_DEFAULT_EFFORT / OKFFS_DEFAULT_TYPE when you omit them — so if you genuinely can't judge, omit the field rather than guessing.");
|
|
29
35
|
}
|
|
30
|
-
// Static description (generic scale) — the safe fallback used before the board
|
|
31
|
-
// reachable and whenever real options can't be read.
|
|
36
|
+
// Static description (generic scale) — the safe fallback used before the board /
|
|
37
|
+
// org types are reachable and whenever real options can't be read.
|
|
32
38
|
export const description = DESCRIPTION_HEAD + inferenceGuidance() + DESCRIPTION_TAIL;
|
|
33
|
-
// Dynamic description resolved at tools/list time (index.ts awaits this).
|
|
34
|
-
// auto-add is on
|
|
35
|
-
//
|
|
36
|
-
//
|
|
39
|
+
// Dynamic description resolved at tools/list time (index.ts awaits this). Inject
|
|
40
|
+
// the board's real Priority/Effort options (when auto-add is on — #133) and the
|
|
41
|
+
// org's real Issue Type names (when type inference is on — #201) so Claude infers
|
|
42
|
+
// against them. Any miss falls back to the generic scale. Cheap after the first
|
|
43
|
+
// call — board metadata and org types are memoized.
|
|
37
44
|
export async function getDescription() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
const boardOn = boardAutoAddEnabled();
|
|
46
|
+
const wantPriority = boardOn && config.inferPriority;
|
|
47
|
+
const wantEffort = boardOn && config.inferEffort;
|
|
48
|
+
if (!wantPriority && !wantEffort && !config.inferType)
|
|
41
49
|
return description;
|
|
42
|
-
const [priorityOpts, effortOpts] = await Promise.all([
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
const [priorityOpts, effortOpts, typeOpts] = await Promise.all([
|
|
51
|
+
wantPriority ? getBoardFieldOptions("Priority") : Promise.resolve(null),
|
|
52
|
+
wantEffort ? getBoardFieldOptions("Effort") : Promise.resolve(null),
|
|
53
|
+
config.inferType ? getIssueTypeNames() : Promise.resolve(null),
|
|
45
54
|
]);
|
|
46
|
-
if (!priorityOpts && !effortOpts)
|
|
55
|
+
if (!priorityOpts && !effortOpts && !typeOpts)
|
|
47
56
|
return description;
|
|
48
|
-
return DESCRIPTION_HEAD + inferenceGuidance(priorityOpts, effortOpts) + DESCRIPTION_TAIL;
|
|
57
|
+
return DESCRIPTION_HEAD + inferenceGuidance(priorityOpts, effortOpts, typeOpts) + DESCRIPTION_TAIL;
|
|
49
58
|
}
|
|
50
59
|
export const inputSchema = z.object({
|
|
51
60
|
title: z.string().describe("Issue title"),
|
|
@@ -55,15 +64,18 @@ export const inputSchema = z.object({
|
|
|
55
64
|
milestone: z.number().int().optional().describe("Milestone number to assign"),
|
|
56
65
|
priority: z.string().optional().describe("Optional Project board Priority (e.g. Urgent, High, Medium, Low) — matched against the board's Priority options (project-native field, or a GitHub org Issue Field when OKFFS_CLASSIC_PAT is set). Only applied when OKFFS_PROJECT_AUTO_ADD=true and a Priority field exists. If omitted, OKFFS_DEFAULT_PRIORITY is used when set."),
|
|
57
66
|
effort: z.string().optional().describe("Optional Project board Effort (e.g. High, Medium, Low) — matched against the board's Effort options (project-native field, or a GitHub org Issue Field when OKFFS_CLASSIC_PAT is set). Only applied when OKFFS_PROJECT_AUTO_ADD=true and an Effort field exists. If omitted, OKFFS_DEFAULT_EFFORT is used when set."),
|
|
67
|
+
type: z.string().optional().describe("Optional native GitHub Issue Type (e.g. Task, Bug, Feature — plus Epic/Story if the org defines them) — matched against the org's enabled Issue Types. Org-level feature: skipped cleanly on a user-owned repo or when the token can't read them. If omitted, OKFFS_DEFAULT_TYPE is used when set."),
|
|
58
68
|
});
|
|
59
69
|
export async function handler(input) {
|
|
60
70
|
const resolvedAssignees = input.assignees ?? config.defaultAssignees;
|
|
61
71
|
const resolvedLabels = [
|
|
62
72
|
...new Set([...(input.labels ?? []), ...config.defaultLabels])
|
|
63
73
|
];
|
|
64
|
-
// Fall back to OKFFS_DEFAULT_PRIORITY / OKFFS_DEFAULT_EFFORT
|
|
74
|
+
// Fall back to OKFFS_DEFAULT_PRIORITY / OKFFS_DEFAULT_EFFORT / OKFFS_DEFAULT_TYPE
|
|
75
|
+
// when not given.
|
|
65
76
|
const resolvedPriority = input.priority ?? config.defaultPriority;
|
|
66
77
|
const resolvedEffort = input.effort ?? config.defaultEffort;
|
|
78
|
+
const resolvedType = input.type ?? config.defaultType;
|
|
67
79
|
const issue = await createIssue(input.title, input.description, resolvedAssignees, resolvedLabels, input.milestone);
|
|
68
80
|
const branchName = buildBranchName(issue.number, input.title);
|
|
69
81
|
const defaultBranch = await getDefaultBranch();
|
|
@@ -71,6 +83,13 @@ export async function handler(input) {
|
|
|
71
83
|
await createBranch(branchName, ref.object.sha);
|
|
72
84
|
const updatedBody = `${input.description}\n\n**Branch:** \`${branchName}\``;
|
|
73
85
|
await updateIssueBody(issue.number, updatedBody);
|
|
86
|
+
// Set the native GitHub Issue Type (Task/Bug/Feature/…). Non-fatal, like the
|
|
87
|
+
// board writes: any miss (user repo, no org types, unknown name) is surfaced in
|
|
88
|
+
// the response and never blocks issue creation.
|
|
89
|
+
let typeOutcome = null;
|
|
90
|
+
if (resolvedType) {
|
|
91
|
+
typeOutcome = await applyIssueType(issue.number, resolvedType);
|
|
92
|
+
}
|
|
74
93
|
// Add the issue to the configured Project board (fallback for users without
|
|
75
94
|
// native board automation) and set Priority/Effort. Non-fatal, mirroring the
|
|
76
95
|
// autoPR block below: any failure warns with an [okffs] prefix, is surfaced in
|
|
@@ -91,27 +110,13 @@ export async function handler(input) {
|
|
|
91
110
|
if (config.autoPR) {
|
|
92
111
|
// Push an empty init commit so the branch diverges from base, allowing
|
|
93
112
|
// GitHub to accept a draft PR immediately. Only needed for the auto-PR flow.
|
|
94
|
-
|
|
113
|
+
// Shared with create_pull_request's allow_empty backfill (#205).
|
|
95
114
|
try {
|
|
96
|
-
|
|
97
|
-
git(["checkout", branchName]);
|
|
98
|
-
git(["commit", "--allow-empty", "-m", `chore: init branch for #${issue.number}`]);
|
|
99
|
-
git(["push", "origin", branchName]);
|
|
115
|
+
pushEmptyInitCommit(branchName, issue.number);
|
|
100
116
|
}
|
|
101
117
|
catch (err) {
|
|
102
118
|
console.warn("[okffs] Failed to push init commit:", err instanceof Error ? err.message : err);
|
|
103
119
|
}
|
|
104
|
-
finally {
|
|
105
|
-
// Always restore the caller's original branch, even if a step above failed.
|
|
106
|
-
if (previousBranch && previousBranch !== branchName) {
|
|
107
|
-
try {
|
|
108
|
-
git(["checkout", previousBranch]);
|
|
109
|
-
}
|
|
110
|
-
catch (err) {
|
|
111
|
-
console.warn("[okffs] Failed to restore branch:", err instanceof Error ? err.message : err);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
120
|
try {
|
|
116
121
|
const pr = await createDraftPullRequest(`WIP: #${issue.number} - ${input.title}`, `Closes #${issue.number}`, branchName, defaultBranch);
|
|
117
122
|
draftPRUrl = pr.html_url;
|
|
@@ -145,6 +150,11 @@ export async function handler(input) {
|
|
|
145
150
|
const source = input.labels ? "" : " (default)";
|
|
146
151
|
lines.push(`Labels: ${resolvedLabels.join(", ")}${source}`);
|
|
147
152
|
}
|
|
153
|
+
if (typeOutcome) {
|
|
154
|
+
lines.push("applied" in typeOutcome
|
|
155
|
+
? `Type: ${typeOutcome.applied}${input.type ? "" : " (default)"}`
|
|
156
|
+
: `⚠ Type "${resolvedType}" not set — ${typeOutcome.skipped}`);
|
|
157
|
+
}
|
|
148
158
|
const addedToBoard = Boolean(boardAdd);
|
|
149
159
|
lines.push(...renderBoardLines({
|
|
150
160
|
addedToBoard,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_issue.js","sourceRoot":"","sources":["../../src/tools/create_issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC7I,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"create_issue.js","sourceRoot":"","sources":["../../src/tools/create_issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC7I,OAAO,EAAE,MAAM,E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AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const name = "create_issues_from_list";
|
|
3
|
-
export declare const description = "Create multiple GitHub issues and matching branches from a list of tasks. Before calling this tool, infer appropriate labels for each task from its title and description using GitHub's default labels: bug, documentation, duplicate, enhancement, good first issue, help wanted, invalid, question, wontfix. Pass inferred labels per task in the labels field unless the user has specified their own. When the Project board is enabled (OKFFS_PROJECT_AUTO_ADD=true), each issue is added to the board like create_issue does \u2014 infer a per-task priority/effort where you can, falling back to OKFFS_DEFAULT_PRIORITY/EFFORT. Confirms before creating.";
|
|
3
|
+
export declare const description = "Create multiple GitHub issues and matching branches from a list of tasks. Before calling this tool, infer appropriate labels for each task from its title and description using GitHub's default labels: bug, documentation, duplicate, enhancement, good first issue, help wanted, invalid, question, wontfix. Pass inferred labels per task in the labels field unless the user has specified their own. When the Project board is enabled (OKFFS_PROJECT_AUTO_ADD=true), each issue is added to the board like create_issue does \u2014 infer a per-task priority/effort where you can, falling back to OKFFS_DEFAULT_PRIORITY/EFFORT. Also infer a per-task native GitHub Issue Type (Task/Bug/Feature/\u2026) where the org defines them, falling back to OKFFS_DEFAULT_TYPE. Confirms before creating.";
|
|
4
4
|
export declare const inputSchema: z.ZodObject<{
|
|
5
5
|
tasks: z.ZodArray<z.ZodObject<{
|
|
6
6
|
title: z.ZodString;
|
|
@@ -10,9 +10,11 @@ export declare const inputSchema: z.ZodObject<{
|
|
|
10
10
|
milestone: z.ZodOptional<z.ZodNumber>;
|
|
11
11
|
priority: z.ZodOptional<z.ZodString>;
|
|
12
12
|
effort: z.ZodOptional<z.ZodString>;
|
|
13
|
+
type: z.ZodOptional<z.ZodString>;
|
|
13
14
|
}, "strip", z.ZodTypeAny, {
|
|
14
15
|
title: string;
|
|
15
16
|
description: string;
|
|
17
|
+
type?: string | undefined;
|
|
16
18
|
priority?: string | undefined;
|
|
17
19
|
effort?: string | undefined;
|
|
18
20
|
assignees?: string[] | undefined;
|
|
@@ -21,6 +23,7 @@ export declare const inputSchema: z.ZodObject<{
|
|
|
21
23
|
}, {
|
|
22
24
|
title: string;
|
|
23
25
|
description: string;
|
|
26
|
+
type?: string | undefined;
|
|
24
27
|
priority?: string | undefined;
|
|
25
28
|
effort?: string | undefined;
|
|
26
29
|
assignees?: string[] | undefined;
|
|
@@ -32,6 +35,7 @@ export declare const inputSchema: z.ZodObject<{
|
|
|
32
35
|
tasks: {
|
|
33
36
|
title: string;
|
|
34
37
|
description: string;
|
|
38
|
+
type?: string | undefined;
|
|
35
39
|
priority?: string | undefined;
|
|
36
40
|
effort?: string | undefined;
|
|
37
41
|
assignees?: string[] | undefined;
|
|
@@ -43,6 +47,7 @@ export declare const inputSchema: z.ZodObject<{
|
|
|
43
47
|
tasks: {
|
|
44
48
|
title: string;
|
|
45
49
|
description: string;
|
|
50
|
+
type?: string | undefined;
|
|
46
51
|
priority?: string | undefined;
|
|
47
52
|
effort?: string | undefined;
|
|
48
53
|
assignees?: string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_issues_from_list.d.ts","sourceRoot":"","sources":["../../src/tools/create_issues_from_list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"create_issues_from_list.d.ts","sourceRoot":"","sources":["../../src/tools/create_issues_from_list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,IAAI,4BAA4B,CAAC;AAE9C,eAAO,MAAM,WAAW,ixBAC8uB,CAAC;AAmBvwB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtB,CAAC;AAEH,wBAAsB,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC;;;;;GAqF/D"}
|
|
@@ -2,8 +2,9 @@ import { z } from "zod";
|
|
|
2
2
|
import { createIssue, updateIssueBody, getDefaultBranch, getRef, createBranch, buildBranchName } from "../github.js";
|
|
3
3
|
import { config } from "../config.js";
|
|
4
4
|
import { boardAutoAddEnabled, addIssueToBoard, applyInitialStatus, renderBoardLines, } from "../board.js";
|
|
5
|
+
import { applyIssueType } from "../issue_types.js";
|
|
5
6
|
export const name = "create_issues_from_list";
|
|
6
|
-
export const description = "Create multiple GitHub issues and matching branches from a list of tasks. Before calling this tool, infer appropriate labels for each task from its title and description using GitHub's default labels: bug, documentation, duplicate, enhancement, good first issue, help wanted, invalid, question, wontfix. Pass inferred labels per task in the labels field unless the user has specified their own. When the Project board is enabled (OKFFS_PROJECT_AUTO_ADD=true), each issue is added to the board like create_issue does — infer a per-task priority/effort where you can, falling back to OKFFS_DEFAULT_PRIORITY/EFFORT. Confirms before creating.";
|
|
7
|
+
export const description = "Create multiple GitHub issues and matching branches from a list of tasks. Before calling this tool, infer appropriate labels for each task from its title and description using GitHub's default labels: bug, documentation, duplicate, enhancement, good first issue, help wanted, invalid, question, wontfix. Pass inferred labels per task in the labels field unless the user has specified their own. When the Project board is enabled (OKFFS_PROJECT_AUTO_ADD=true), each issue is added to the board like create_issue does — infer a per-task priority/effort where you can, falling back to OKFFS_DEFAULT_PRIORITY/EFFORT. Also infer a per-task native GitHub Issue Type (Task/Bug/Feature/…) where the org defines them, falling back to OKFFS_DEFAULT_TYPE. Confirms before creating.";
|
|
7
8
|
const taskSchema = z.object({
|
|
8
9
|
title: z.string().describe("Issue title"),
|
|
9
10
|
description: z.string().describe("Issue body / description"),
|
|
@@ -12,6 +13,7 @@ const taskSchema = z.object({
|
|
|
12
13
|
milestone: z.number().int().optional().describe("Milestone number to assign"),
|
|
13
14
|
priority: z.string().optional().describe("Optional Project board Priority (e.g. Urgent, High, Medium, Low). Only applied when OKFFS_PROJECT_AUTO_ADD=true; falls back to OKFFS_DEFAULT_PRIORITY when omitted."),
|
|
14
15
|
effort: z.string().optional().describe("Optional Project board Effort (e.g. High, Medium, Low). Only applied when OKFFS_PROJECT_AUTO_ADD=true; falls back to OKFFS_DEFAULT_EFFORT when omitted."),
|
|
16
|
+
type: z.string().optional().describe("Optional native GitHub Issue Type (e.g. Task, Bug, Feature, Epic, Story) — matched against the org's enabled Issue Types. Skipped cleanly when unavailable; falls back to OKFFS_DEFAULT_TYPE when omitted."),
|
|
15
17
|
});
|
|
16
18
|
export const inputSchema = z.object({
|
|
17
19
|
tasks: z.array(taskSchema).min(1).describe("List of issues to create"),
|
|
@@ -39,11 +41,17 @@ export async function handler(input) {
|
|
|
39
41
|
];
|
|
40
42
|
const resolvedPriority = task.priority ?? config.defaultPriority;
|
|
41
43
|
const resolvedEffort = task.effort ?? config.defaultEffort;
|
|
44
|
+
const resolvedType = task.type ?? config.defaultType;
|
|
42
45
|
const issue = await createIssue(task.title, task.description, resolvedAssignees, resolvedLabels, task.milestone);
|
|
43
46
|
const branchName = buildBranchName(issue.number, task.title);
|
|
44
47
|
await createBranch(branchName, ref.object.sha);
|
|
45
48
|
const updatedBody = `${task.description}\n\n**Branch:** \`${branchName}\``;
|
|
46
49
|
await updateIssueBody(issue.number, updatedBody);
|
|
50
|
+
// Native Issue Type — non-fatal per task, surfaced in the entry below.
|
|
51
|
+
let typeOutcome = null;
|
|
52
|
+
if (resolvedType) {
|
|
53
|
+
typeOutcome = await applyIssueType(issue.number, resolvedType);
|
|
54
|
+
}
|
|
47
55
|
// Board placement, mirroring create_issue. Non-fatal per task and surfaced in
|
|
48
56
|
// the response — never silent (#144, #146). No draft PR here, so the initial
|
|
49
57
|
// status has no linked-PR race to win and can be applied right away.
|
|
@@ -76,6 +84,11 @@ export async function handler(input) {
|
|
|
76
84
|
initialStatus,
|
|
77
85
|
indent: " ",
|
|
78
86
|
}));
|
|
87
|
+
if (typeOutcome) {
|
|
88
|
+
entryLines.push("applied" in typeOutcome
|
|
89
|
+
? ` Type: ${typeOutcome.applied}`
|
|
90
|
+
: ` ⚠ Type "${resolvedType}" not set — ${typeOutcome.skipped}`);
|
|
91
|
+
}
|
|
79
92
|
results.push(entryLines.join("\n"));
|
|
80
93
|
}
|
|
81
94
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_issues_from_list.js","sourceRoot":"","sources":["../../src/tools/create_issues_from_list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"create_issues_from_list.js","sourceRoot":"","sources":["../../src/tools/create_issues_from_list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,GAIjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,CAAC,MAAM,IAAI,GAAG,yBAAyB,CAAC;AAE9C,MAAM,CAAC,MAAM,WAAW,GACtB,owBAAowB,CAAC;AAEvwB,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0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C7B,KAAK,KAAK,CAAC,QAAQ,EAAE;SACtB,CAAC;QACF,UAAU,CAAC,IAAI,CACb,GAAG,gBAAgB,CAAC;YAClB,YAAY,EAAE,OAAO,CAAC,QAAQ,CAAC;YAC/B,UAAU;YACV,iBAAiB,EAAE,gBAAgB;YACnC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,IAAI,IAAI;YACpC,eAAe,EAAE,cAAc;YAC/B,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,IAAI;YAChC,eAAe,EAAE,MAAM,CAAC,oBAAoB;YAC5C,aAAa;YACb,MAAM,EAAE,IAAI;SACb,CAAC,CACH,CAAC;QACF,IAAI,WAAW,EAAE,CAAC;YAChB,UAAU,CAAC,IAAI,CACb,SAAS,IAAI,WAAW;gBACtB,CAAC,CAAC,WAAW,WAAW,CAAC,OAAO,EAAE;gBAClC,CAAC,CAAC,aAAa,YAAY,eAAe,WAAW,CAAC,OAAO,EAAE,CAClE,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC;IAED,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,OAAO,CAAC,MAAM,iBAAiB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;KAC7G,CAAC;AACJ,CAAC"}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const name = "create_pull_request";
|
|
3
|
-
export declare const description = "Create a pull request for the current issue branch. Reads the issue, its comments, and commits to generate a PR title and body. Always includes Closes #N. If OKFFS_UPDATE_DOCS is true, writes a per-issue changelog fragment under .changes/unreleased/ (assembled into CHANGELOG.md at release time by prepare_release \u2014 not a direct CHANGELOG.md edit), plus SECURITY.md for security-related changes, and commits them onto the branch before creating the PR. If a PR already exists for the branch (e.g. a draft opened by create_issue under OKFFS_AUTO_PR=true), it is updated and marked ready for review instead of erroring. Posts a summary comment to the issue. If the issue has no okffs-created branch link (no **Branch:** line \u2014 e.g. a pre-okffs issue or a hand-made branch), pass an explicit branch, or check out a branch named {issue-number}-\u2026 and okffs infers it; either way it backfills the **Branch:** line. If the PR targets OKFFS_PROTECTED_BRANCH, okffs still opens it (opening is safe and reversible) and adds a reminder that the merge/tag stay with the user \u2014 OKFFS_PROTECTED_BRANCH governs autonomous merging, never PR creation.";
|
|
3
|
+
export declare const description = "Create a pull request for the current issue branch. Reads the issue, its comments, and commits to generate a PR title and body. Always includes Closes #N. If OKFFS_UPDATE_DOCS is true, writes a per-issue changelog fragment under .changes/unreleased/ (assembled into CHANGELOG.md at release time by prepare_release \u2014 not a direct CHANGELOG.md edit), plus SECURITY.md for security-related changes, and commits them onto the branch before creating the PR. If a PR already exists for the branch (e.g. a draft opened by create_issue under OKFFS_AUTO_PR=true), it is updated and marked ready for review instead of erroring. By default, a branch with no commits ahead of base is refused (a PR needs a diff); pass allow_empty: true to instead push an empty init commit so the branch diverges and open a **draft** tracking PR \u2014 the same mechanism create_issue uses under OKFFS_AUTO_PR, for backfilling a PR onto a branch that was created empty. Posts a summary comment to the issue. If the issue has no okffs-created branch link (no **Branch:** line \u2014 e.g. a pre-okffs issue or a hand-made branch), pass an explicit branch, or check out a branch named {issue-number}-\u2026 and okffs infers it; either way it backfills the **Branch:** line. If the PR targets OKFFS_PROTECTED_BRANCH, okffs still opens it (opening is safe and reversible) and adds a reminder that the merge/tag stay with the user \u2014 OKFFS_PROTECTED_BRANCH governs autonomous merging, never PR creation.";
|
|
4
4
|
export declare const inputSchema: z.ZodObject<{
|
|
5
5
|
issue_number: z.ZodNumber;
|
|
6
6
|
summary: z.ZodOptional<z.ZodString>;
|
|
7
7
|
branch: z.ZodOptional<z.ZodString>;
|
|
8
|
+
allow_empty: z.ZodOptional<z.ZodBoolean>;
|
|
8
9
|
}, "strip", z.ZodTypeAny, {
|
|
9
10
|
issue_number: number;
|
|
10
11
|
summary?: string | undefined;
|
|
11
12
|
branch?: string | undefined;
|
|
13
|
+
allow_empty?: boolean | undefined;
|
|
12
14
|
}, {
|
|
13
15
|
issue_number: number;
|
|
14
16
|
summary?: string | undefined;
|
|
15
17
|
branch?: string | undefined;
|
|
18
|
+
allow_empty?: boolean | undefined;
|
|
16
19
|
}>;
|
|
17
20
|
export declare function handler(input: z.infer<typeof inputSchema>): Promise<{
|
|
18
21
|
content: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_pull_request.d.ts","sourceRoot":"","sources":["../../src/tools/create_pull_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"create_pull_request.d.ts","sourceRoot":"","sources":["../../src/tools/create_pull_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,eAAO,MAAM,IAAI,wBAAwB,CAAC;AAE1C,eAAO,MAAM,WAAW,08CACw5C,CAAC;AAEj7C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;EAKtB,CAAC;AAEH,wBAAsB,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC;;;;;GAmQ/D"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { getIssue, extractBranchFromBody, getDefaultBranch, getBranchCommits, getIssueComments, createPullRequest, getOpenPullRequestForBranch, updatePullRequest, markPullRequestReady, getRepoDefaultBranch, addIssueComment, updateIssueBody, } from "../github.js";
|
|
2
|
+
import { getIssue, extractBranchFromBody, getDefaultBranch, getBranchCommits, getIssueComments, createPullRequest, createDraftPullRequest, getOpenPullRequestForBranch, updatePullRequest, markPullRequestReady, getRepoDefaultBranch, addIssueComment, updateIssueBody, } from "../github.js";
|
|
3
3
|
import { config } from "../config.js";
|
|
4
4
|
import { updateProjectDocs } from "../docs.js";
|
|
5
|
-
import { git, currentBranch } from "../git.js";
|
|
5
|
+
import { git, currentBranch, pushEmptyInitCommit } from "../git.js";
|
|
6
6
|
export const name = "create_pull_request";
|
|
7
|
-
export const description = "Create a pull request for the current issue branch. Reads the issue, its comments, and commits to generate a PR title and body. Always includes Closes #N. If OKFFS_UPDATE_DOCS is true, writes a per-issue changelog fragment under .changes/unreleased/ (assembled into CHANGELOG.md at release time by prepare_release — not a direct CHANGELOG.md edit), plus SECURITY.md for security-related changes, and commits them onto the branch before creating the PR. If a PR already exists for the branch (e.g. a draft opened by create_issue under OKFFS_AUTO_PR=true), it is updated and marked ready for review instead of erroring. Posts a summary comment to the issue. If the issue has no okffs-created branch link (no **Branch:** line — e.g. a pre-okffs issue or a hand-made branch), pass an explicit branch, or check out a branch named {issue-number}-… and okffs infers it; either way it backfills the **Branch:** line. If the PR targets OKFFS_PROTECTED_BRANCH, okffs still opens it (opening is safe and reversible) and adds a reminder that the merge/tag stay with the user — OKFFS_PROTECTED_BRANCH governs autonomous merging, never PR creation.";
|
|
7
|
+
export const description = "Create a pull request for the current issue branch. Reads the issue, its comments, and commits to generate a PR title and body. Always includes Closes #N. If OKFFS_UPDATE_DOCS is true, writes a per-issue changelog fragment under .changes/unreleased/ (assembled into CHANGELOG.md at release time by prepare_release — not a direct CHANGELOG.md edit), plus SECURITY.md for security-related changes, and commits them onto the branch before creating the PR. If a PR already exists for the branch (e.g. a draft opened by create_issue under OKFFS_AUTO_PR=true), it is updated and marked ready for review instead of erroring. By default, a branch with no commits ahead of base is refused (a PR needs a diff); pass allow_empty: true to instead push an empty init commit so the branch diverges and open a **draft** tracking PR — the same mechanism create_issue uses under OKFFS_AUTO_PR, for backfilling a PR onto a branch that was created empty. Posts a summary comment to the issue. If the issue has no okffs-created branch link (no **Branch:** line — e.g. a pre-okffs issue or a hand-made branch), pass an explicit branch, or check out a branch named {issue-number}-… and okffs infers it; either way it backfills the **Branch:** line. If the PR targets OKFFS_PROTECTED_BRANCH, okffs still opens it (opening is safe and reversible) and adds a reminder that the merge/tag stay with the user — OKFFS_PROTECTED_BRANCH governs autonomous merging, never PR creation.";
|
|
8
8
|
export const inputSchema = z.object({
|
|
9
9
|
issue_number: z.number().int().positive().describe("The issue number to create a PR for"),
|
|
10
10
|
summary: z.string().optional().describe("Optional summary of what was done — used in PR body and issue comment"),
|
|
11
11
|
branch: z.string().optional().describe("Branch to open the PR from, for issues whose branch okffs didn't create (no **Branch:** line in the body). Usually unnecessary — okffs-created issues carry the link, and a checked-out branch named {issue-number}-… is inferred automatically. When used, okffs backfills the **Branch:** line onto the issue."),
|
|
12
|
+
allow_empty: z.boolean().optional().describe("When the branch has no commits ahead of base, push an empty init commit so it diverges and open a DRAFT tracking PR instead of refusing. Opt-in (default false) — use to backfill a PR onto a branch that was created empty. Ignored when the branch already has commits."),
|
|
12
13
|
});
|
|
13
14
|
export async function handler(input) {
|
|
14
15
|
const issue = await getIssue(input.issue_number);
|
|
@@ -67,13 +68,33 @@ export async function handler(input) {
|
|
|
67
68
|
`merging will **not** auto-close #${input.issue_number}. Close it manually with \`close_issue\` after merge.`;
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
+
let commits = await getBranchCommits(branchName, baseBranch);
|
|
71
72
|
const comments = await getIssueComments(input.issue_number);
|
|
73
|
+
// Whether this is a backfilled tracking PR (empty branch + allow_empty). Such
|
|
74
|
+
// PRs are opened as drafts — there's no real work to review yet.
|
|
75
|
+
let draftMode = false;
|
|
72
76
|
if (commits.length === 0) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
if (!input.allow_empty) {
|
|
78
|
+
await addIssueComment(input.issue_number, `PR not created — branch \`${branchName}\` has no commits ahead of \`${baseBranch}\`. Push commits to the branch first, or pass \`allow_empty: true\` to open a draft tracking PR.`);
|
|
79
|
+
return {
|
|
80
|
+
content: [{ type: "text", text: `PR not created — branch \`${branchName}\` has no commits ahead of \`${baseBranch}\`. Push commits first, or pass allow_empty: true for a draft tracking PR.` }],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
// allow_empty: push an empty init commit so the branch diverges from base,
|
|
84
|
+
// then open a draft PR — the same mechanism create_issue uses under
|
|
85
|
+
// OKFFS_AUTO_PR (shared helper), applied to an already-created empty branch.
|
|
86
|
+
try {
|
|
87
|
+
pushEmptyInitCommit(branchName, input.issue_number);
|
|
88
|
+
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
await addIssueComment(input.issue_number, `PR not created — branch \`${branchName}\` is empty and okffs could not push an init commit to diverge it from \`${baseBranch}\`. Push a commit manually, then retry.`);
|
|
91
|
+
return {
|
|
92
|
+
content: [{ type: "text", text: `PR not created — could not push an empty init commit to \`${branchName}\`: ${err instanceof Error ? err.message : String(err)}` }],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
draftMode = true;
|
|
96
|
+
// Re-read so the PR body's Changes section reflects the new init commit.
|
|
97
|
+
commits = await getBranchCommits(branchName, baseBranch);
|
|
77
98
|
}
|
|
78
99
|
const title = `Close #${input.issue_number} - ${issue.title}`;
|
|
79
100
|
const cleanedDescription = issue.body
|
|
@@ -184,6 +205,12 @@ export async function handler(input) {
|
|
|
184
205
|
pr = { number: existing.number, html_url: existing.html_url };
|
|
185
206
|
action = existing.draft ? "finalized (marked ready)" : "updated";
|
|
186
207
|
}
|
|
208
|
+
else if (draftMode) {
|
|
209
|
+
// Empty-branch backfill — open a draft tracking PR (createDraftPullRequest
|
|
210
|
+
// returns just number + html_url, which is all we surface below).
|
|
211
|
+
pr = await createDraftPullRequest(title, body, branchName, baseBranch);
|
|
212
|
+
action = "created (draft tracking PR)";
|
|
213
|
+
}
|
|
187
214
|
else {
|
|
188
215
|
pr = await createPullRequest(title, body, branchName, baseBranch);
|
|
189
216
|
action = "created";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_pull_request.js","sourceRoot":"","sources":["../../src/tools/create_pull_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"create_pull_request.js","sourceRoot":"","sources":["../../src/tools/create_pull_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEpE,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAE1C,MAAM,CAAC,MAAM,WAAW,GACtB,86CAA86C,CAAC;AAEj7C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IACzF,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AiB,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QAClE,MAAM,GAAG,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,OAAO,GAAG;QACd,MAAM,MAAM,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC9B,EAAE;QACF,IAAI;KACL,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,aAAa,GAAG,aAAa,CAAC;IAC7C,MAAM,eAAe,CAAC,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAEnD,4EAA4E;IAC5E,6EAA6E;IAC7E,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc;QACxC,CAAC,CAAC,uLAAuL,UAAU,6BAA6B;QAChO,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,MAAM,IAAI,MAAM,KAAK,EAAE,CAAC,QAAQ,GAAG,aAAa,GAAG,aAAa,GAAG,YAAY,EAAE,EAAE,CAAC;KACxI,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const name = "list_issues";
|
|
3
|
-
export declare const description = "List all open GitHub issues, each with its branch, any linked open or draft PR, its board column (project), its Priority, and its relationships (parent, children, blocked-by, blocking) shown as a tree. Issues are ordered by Priority (Urgent \u2192 High \u2192 Medium \u2192 Low \u2192 unset) so the most important work surfaces first \u2014 factor Priority in when deciding what to do next. Replaces the need for a separate PR-listing tool.";
|
|
3
|
+
export declare const description = "List all open GitHub issues, each with its branch, any linked open or draft PR, its board column (project), its Priority, its native Issue Type (Task/Bug/Feature/\u2026, when the org defines them), and its relationships (parent, children, blocked-by, blocking) shown as a tree. Issues are ordered by Priority (Urgent \u2192 High \u2192 Medium \u2192 Low \u2192 unset) so the most important work surfaces first \u2014 factor Priority in when deciding what to do next. Replaces the need for a separate PR-listing tool.";
|
|
4
4
|
export declare const inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
5
5
|
export declare function handler(_input: z.infer<typeof inputSchema>): Promise<{
|
|
6
6
|
content: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list_issues.d.ts","sourceRoot":"","sources":["../../src/tools/list_issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAElC,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"list_issues.d.ts","sourceRoot":"","sources":["../../src/tools/list_issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAElC,eAAO,MAAM,WAAW,ygBACkd,CAAC;AAE3e,eAAO,MAAM,WAAW,gDAAe,CAAC;AAWxC,wBAAsB,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC;;;;;GA0HhE"}
|
|
@@ -3,7 +3,7 @@ import { listIssues, listOpenPullRequests, parseRelationships, buildBranchName,
|
|
|
3
3
|
import { config } from "../config.js";
|
|
4
4
|
import { getProjectFieldsByIssueNumber, getOrgIssueFieldValuesByNumber } from "../projects.js";
|
|
5
5
|
export const name = "list_issues";
|
|
6
|
-
export const description = "List all open GitHub issues, each with its branch, any linked open or draft PR, its board column (project), its Priority, and its relationships (parent, children, blocked-by, blocking) shown as a tree. Issues are ordered by Priority (Urgent → High → Medium → Low → unset) so the most important work surfaces first — factor Priority in when deciding what to do next. Replaces the need for a separate PR-listing tool.";
|
|
6
|
+
export const description = "List all open GitHub issues, each with its branch, any linked open or draft PR, its board column (project), its Priority, its native Issue Type (Task/Bug/Feature/…, when the org defines them), and its relationships (parent, children, blocked-by, blocking) shown as a tree. Issues are ordered by Priority (Urgent → High → Medium → Low → unset) so the most important work surfaces first — factor Priority in when deciding what to do next. Replaces the need for a separate PR-listing tool.";
|
|
7
7
|
export const inputSchema = z.object({});
|
|
8
8
|
// Board Priority order (highest first); unknown named priorities rank between the
|
|
9
9
|
// known set and unset, so custom option names still sort ahead of no priority.
|
|
@@ -106,6 +106,11 @@ export async function handler(_input) {
|
|
|
106
106
|
if (effort) {
|
|
107
107
|
lines.push(` effort: ${effort}`);
|
|
108
108
|
}
|
|
109
|
+
// Native GitHub Issue Type (Task/Bug/Feature/…), read straight off the issue
|
|
110
|
+
// object — no extra fetch. Absent on user repos / when the org defines none.
|
|
111
|
+
if (issue.type) {
|
|
112
|
+
lines.push(` type: ${issue.type}`);
|
|
113
|
+
}
|
|
109
114
|
// Relationships as a small tree under the issue.
|
|
110
115
|
const relLines = [];
|
|
111
116
|
if (rels.parent.length)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list_issues.js","sourceRoot":"","sources":["../../src/tools/list_issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,KAAK,EACL,IAAI,GAEL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAE/F,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC;AAElC,MAAM,CAAC,MAAM,WAAW,GACtB,
|
|
1
|
+
{"version":3,"file":"list_issues.js","sourceRoot":"","sources":["../../src/tools/list_issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,KAAK,EACL,IAAI,GAE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E,QAAQ,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAE7E,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE;YAC3B,MAAM,SAAS,GAAG,GAAG,KAAK,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YAC5D,KAAK,CAAC,IAAI,CAAC,OAAO,SAAS,IAAI,EAAE,EAAE,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const name = "merge_pull_request";
|
|
3
|
+
export declare const description: string;
|
|
4
|
+
export declare const inputSchema: z.ZodObject<{
|
|
5
|
+
issue_number: z.ZodNumber;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
issue_number: number;
|
|
8
|
+
}, {
|
|
9
|
+
issue_number: number;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function handler(input: z.infer<typeof inputSchema>): Promise<{
|
|
12
|
+
content: {
|
|
13
|
+
type: "text";
|
|
14
|
+
text: string;
|
|
15
|
+
}[];
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=merge_pull_request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge_pull_request.d.ts","sourceRoot":"","sources":["../../src/tools/merge_pull_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,eAAO,MAAM,IAAI,uBAAuB,CAAC;AAEzC,eAAO,MAAM,WAAW,QAK+R,CAAC;AAExT,eAAO,MAAM,WAAW;;;;;;EAEtB,CAAC;AAgBH,wBAAsB,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC;;;;;GAgJ/D"}
|