chief-clancy 0.6.0 → 0.7.1
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/README.md +3 -2
- package/dist/bundle/clancy-afk.js +6 -2
- package/dist/bundle/clancy-once.js +49 -48
- package/dist/installer/hook-installer/hook-installer.d.ts +2 -0
- package/dist/installer/hook-installer/hook-installer.d.ts.map +1 -1
- package/dist/installer/hook-installer/hook-installer.js +36 -1
- package/dist/installer/hook-installer/hook-installer.js.map +1 -1
- package/dist/installer/install.js +8 -0
- package/dist/installer/install.js.map +1 -1
- package/hooks/clancy-branch-guard.js +129 -0
- package/hooks/clancy-context-monitor.js +134 -46
- package/hooks/clancy-post-compact.js +53 -0
- package/hooks/package.json +3 -0
- package/package.json +7 -3
- package/src/agents/verification-gate.md +128 -0
- package/src/roles/setup/workflows/init.md +45 -0
- package/src/roles/setup/workflows/scaffold.md +30 -0
- package/src/roles/setup/workflows/settings.md +56 -0
- package/src/templates/.env.example.github +19 -1
- package/src/templates/.env.example.jira +25 -1
- package/src/templates/.env.example.linear +19 -1
- package/dist/schemas/bitbucket-pr.d.ts +0 -137
- package/dist/schemas/bitbucket-pr.d.ts.map +0 -1
- package/dist/schemas/bitbucket-pr.js +0 -75
- package/dist/schemas/bitbucket-pr.js.map +0 -1
- package/dist/schemas/env.d.ts +0 -150
- package/dist/schemas/env.d.ts.map +0 -1
- package/dist/schemas/env.js +0 -63
- package/dist/schemas/env.js.map +0 -1
- package/dist/schemas/github-issues.d.ts +0 -105
- package/dist/schemas/github-issues.d.ts.map +0 -1
- package/dist/schemas/github-issues.js +0 -54
- package/dist/schemas/github-issues.js.map +0 -1
- package/dist/schemas/gitlab-mr.d.ts +0 -73
- package/dist/schemas/gitlab-mr.d.ts.map +0 -1
- package/dist/schemas/gitlab-mr.js +0 -33
- package/dist/schemas/gitlab-mr.js.map +0 -1
- package/dist/schemas/jira.d.ts +0 -59
- package/dist/schemas/jira.d.ts.map +0 -1
- package/dist/schemas/jira.js +0 -56
- package/dist/schemas/jira.js.map +0 -1
- package/dist/schemas/linear.d.ts +0 -108
- package/dist/schemas/linear.d.ts.map +0 -1
- package/dist/schemas/linear.js +0 -84
- package/dist/schemas/linear.js.map +0 -1
- package/dist/scripts/afk/afk.d.ts +0 -21
- package/dist/scripts/afk/afk.d.ts.map +0 -1
- package/dist/scripts/afk/afk.js +0 -118
- package/dist/scripts/afk/afk.js.map +0 -1
- package/dist/scripts/board/github/github.d.ts +0 -104
- package/dist/scripts/board/github/github.d.ts.map +0 -1
- package/dist/scripts/board/github/github.js +0 -291
- package/dist/scripts/board/github/github.js.map +0 -1
- package/dist/scripts/board/jira/jira.d.ts +0 -139
- package/dist/scripts/board/jira/jira.d.ts.map +0 -1
- package/dist/scripts/board/jira/jira.js +0 -378
- package/dist/scripts/board/jira/jira.js.map +0 -1
- package/dist/scripts/board/linear/linear.d.ts +0 -129
- package/dist/scripts/board/linear/linear.d.ts.map +0 -1
- package/dist/scripts/board/linear/linear.js +0 -393
- package/dist/scripts/board/linear/linear.js.map +0 -1
- package/dist/scripts/once/board-ops/board-ops.d.ts +0 -26
- package/dist/scripts/once/board-ops/board-ops.d.ts.map +0 -1
- package/dist/scripts/once/board-ops/board-ops.js +0 -113
- package/dist/scripts/once/board-ops/board-ops.js.map +0 -1
- package/dist/scripts/once/deliver/deliver.d.ts +0 -37
- package/dist/scripts/once/deliver/deliver.d.ts.map +0 -1
- package/dist/scripts/once/deliver/deliver.js +0 -236
- package/dist/scripts/once/deliver/deliver.js.map +0 -1
- package/dist/scripts/once/fetch-ticket/fetch-ticket.d.ts +0 -22
- package/dist/scripts/once/fetch-ticket/fetch-ticket.d.ts.map +0 -1
- package/dist/scripts/once/fetch-ticket/fetch-ticket.js +0 -123
- package/dist/scripts/once/fetch-ticket/fetch-ticket.js.map +0 -1
- package/dist/scripts/once/git-token/git-token.d.ts +0 -13
- package/dist/scripts/once/git-token/git-token.d.ts.map +0 -1
- package/dist/scripts/once/git-token/git-token.js +0 -30
- package/dist/scripts/once/git-token/git-token.js.map +0 -1
- package/dist/scripts/once/once.d.ts +0 -12
- package/dist/scripts/once/once.d.ts.map +0 -1
- package/dist/scripts/once/once.js +0 -356
- package/dist/scripts/once/once.js.map +0 -1
- package/dist/scripts/once/pr-creation/pr-creation.d.ts +0 -11
- package/dist/scripts/once/pr-creation/pr-creation.d.ts.map +0 -1
- package/dist/scripts/once/pr-creation/pr-creation.js +0 -50
- package/dist/scripts/once/pr-creation/pr-creation.js.map +0 -1
- package/dist/scripts/once/rework/rework.d.ts +0 -32
- package/dist/scripts/once/rework/rework.d.ts.map +0 -1
- package/dist/scripts/once/rework/rework.js +0 -208
- package/dist/scripts/once/rework/rework.js.map +0 -1
- package/dist/scripts/once/types/types.d.ts +0 -13
- package/dist/scripts/once/types/types.d.ts.map +0 -1
- package/dist/scripts/once/types/types.js +0 -2
- package/dist/scripts/once/types/types.js.map +0 -1
- package/dist/scripts/shared/branch/branch.d.ts +0 -50
- package/dist/scripts/shared/branch/branch.d.ts.map +0 -1
- package/dist/scripts/shared/branch/branch.js +0 -61
- package/dist/scripts/shared/branch/branch.js.map +0 -1
- package/dist/scripts/shared/claude-cli/claude-cli.d.ts +0 -31
- package/dist/scripts/shared/claude-cli/claude-cli.d.ts.map +0 -1
- package/dist/scripts/shared/claude-cli/claude-cli.js +0 -60
- package/dist/scripts/shared/claude-cli/claude-cli.js.map +0 -1
- package/dist/scripts/shared/env-schema/env-schema.d.ts +0 -27
- package/dist/scripts/shared/env-schema/env-schema.d.ts.map +0 -1
- package/dist/scripts/shared/env-schema/env-schema.js +0 -47
- package/dist/scripts/shared/env-schema/env-schema.js.map +0 -1
- package/dist/scripts/shared/feasibility/feasibility.d.ts +0 -30
- package/dist/scripts/shared/feasibility/feasibility.d.ts.map +0 -1
- package/dist/scripts/shared/feasibility/feasibility.js +0 -68
- package/dist/scripts/shared/feasibility/feasibility.js.map +0 -1
- package/dist/scripts/shared/format/format.d.ts +0 -11
- package/dist/scripts/shared/format/format.d.ts.map +0 -1
- package/dist/scripts/shared/format/format.js +0 -18
- package/dist/scripts/shared/format/format.js.map +0 -1
- package/dist/scripts/shared/git-ops/git-ops.d.ts +0 -90
- package/dist/scripts/shared/git-ops/git-ops.d.ts.map +0 -1
- package/dist/scripts/shared/git-ops/git-ops.js +0 -190
- package/dist/scripts/shared/git-ops/git-ops.js.map +0 -1
- package/dist/scripts/shared/http/http.d.ts +0 -54
- package/dist/scripts/shared/http/http.d.ts.map +0 -1
- package/dist/scripts/shared/http/http.js +0 -76
- package/dist/scripts/shared/http/http.js.map +0 -1
- package/dist/scripts/shared/notify/notify.d.ts +0 -46
- package/dist/scripts/shared/notify/notify.d.ts.map +0 -1
- package/dist/scripts/shared/notify/notify.js +0 -88
- package/dist/scripts/shared/notify/notify.js.map +0 -1
- package/dist/scripts/shared/preflight/preflight.d.ts +0 -40
- package/dist/scripts/shared/preflight/preflight.d.ts.map +0 -1
- package/dist/scripts/shared/preflight/preflight.js +0 -96
- package/dist/scripts/shared/preflight/preflight.js.map +0 -1
- package/dist/scripts/shared/progress/progress.d.ts +0 -75
- package/dist/scripts/shared/progress/progress.d.ts.map +0 -1
- package/dist/scripts/shared/progress/progress.js +0 -210
- package/dist/scripts/shared/progress/progress.js.map +0 -1
- package/dist/scripts/shared/prompt/prompt.d.ts +0 -58
- package/dist/scripts/shared/prompt/prompt.d.ts.map +0 -1
- package/dist/scripts/shared/prompt/prompt.js +0 -123
- package/dist/scripts/shared/prompt/prompt.js.map +0 -1
- package/dist/scripts/shared/pull-request/bitbucket/bitbucket.d.ts +0 -82
- package/dist/scripts/shared/pull-request/bitbucket/bitbucket.d.ts.map +0 -1
- package/dist/scripts/shared/pull-request/bitbucket/bitbucket.js +0 -301
- package/dist/scripts/shared/pull-request/bitbucket/bitbucket.js.map +0 -1
- package/dist/scripts/shared/pull-request/github/github.d.ts +0 -72
- package/dist/scripts/shared/pull-request/github/github.d.ts.map +0 -1
- package/dist/scripts/shared/pull-request/github/github.js +0 -226
- package/dist/scripts/shared/pull-request/github/github.js.map +0 -1
- package/dist/scripts/shared/pull-request/gitlab/gitlab.d.ts +0 -74
- package/dist/scripts/shared/pull-request/gitlab/gitlab.d.ts.map +0 -1
- package/dist/scripts/shared/pull-request/gitlab/gitlab.js +0 -220
- package/dist/scripts/shared/pull-request/gitlab/gitlab.js.map +0 -1
- package/dist/scripts/shared/pull-request/post-pr/post-pr.d.ts +0 -31
- package/dist/scripts/shared/pull-request/post-pr/post-pr.d.ts.map +0 -1
- package/dist/scripts/shared/pull-request/post-pr/post-pr.js +0 -61
- package/dist/scripts/shared/pull-request/post-pr/post-pr.js.map +0 -1
- package/dist/scripts/shared/pull-request/pr-body/pr-body.d.ts +0 -40
- package/dist/scripts/shared/pull-request/pr-body/pr-body.d.ts.map +0 -1
- package/dist/scripts/shared/pull-request/pr-body/pr-body.js +0 -84
- package/dist/scripts/shared/pull-request/pr-body/pr-body.js.map +0 -1
- package/dist/scripts/shared/pull-request/rework-comment/rework-comment.d.ts +0 -23
- package/dist/scripts/shared/pull-request/rework-comment/rework-comment.d.ts.map +0 -1
- package/dist/scripts/shared/pull-request/rework-comment/rework-comment.js +0 -30
- package/dist/scripts/shared/pull-request/rework-comment/rework-comment.js.map +0 -1
- package/dist/scripts/shared/remote/remote.d.ts +0 -41
- package/dist/scripts/shared/remote/remote.d.ts.map +0 -1
- package/dist/scripts/shared/remote/remote.js +0 -227
- package/dist/scripts/shared/remote/remote.js.map +0 -1
- package/dist/types/board.d.ts +0 -13
- package/dist/types/board.d.ts.map +0 -1
- package/dist/types/board.js +0 -5
- package/dist/types/board.js.map +0 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
- package/dist/types/remote.d.ts +0 -55
- package/dist/types/remote.d.ts.map +0 -1
- package/dist/types/remote.js +0 -5
- package/dist/types/remote.js.map +0 -1
- package/dist/utils/parse-json/parse-json.d.ts +0 -20
- package/dist/utils/parse-json/parse-json.d.ts.map +0 -1
- package/dist/utils/parse-json/parse-json.js +0 -27
- package/dist/utils/parse-json/parse-json.js.map +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PR/MR body builder.
|
|
3
|
-
*
|
|
4
|
-
* Constructs the pull request description with a link back to the
|
|
5
|
-
* board ticket and a Clancy footer.
|
|
6
|
-
*/
|
|
7
|
-
import type { ProgressEntry } from '../../../../scripts/shared/progress/progress.js';
|
|
8
|
-
import type { BoardConfig, Ticket } from '../../../../types/index.js';
|
|
9
|
-
/**
|
|
10
|
-
* Check whether a target branch is an epic or milestone branch.
|
|
11
|
-
*
|
|
12
|
-
* @param targetBranch - The branch the PR targets.
|
|
13
|
-
* @returns `true` if it's an epic (`epic/`) or milestone (`milestone/`) branch.
|
|
14
|
-
*/
|
|
15
|
-
export declare function isEpicBranch(targetBranch: string): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Build the PR/MR body for a ticket.
|
|
18
|
-
*
|
|
19
|
-
* Includes a link back to the board ticket (auto-close for GitHub Issues
|
|
20
|
-
* when targeting the base branch, or "Part of" when targeting an epic branch)
|
|
21
|
-
* and a Clancy attribution footer.
|
|
22
|
-
*
|
|
23
|
-
* @param config - The board configuration.
|
|
24
|
-
* @param ticket - The ticket being implemented.
|
|
25
|
-
* @param targetBranch - The branch the PR targets (used to determine `Closes` vs `Part of`).
|
|
26
|
-
* @returns The PR body as a markdown string.
|
|
27
|
-
*/
|
|
28
|
-
export declare function buildPrBody(config: BoardConfig, ticket: Ticket, targetBranch?: string): string;
|
|
29
|
-
/**
|
|
30
|
-
* Build the PR body for the final epic PR (epic branch → base branch).
|
|
31
|
-
*
|
|
32
|
-
* Lists all child tickets with their PR numbers for traceability.
|
|
33
|
-
*
|
|
34
|
-
* @param epicKey - The epic ticket key (e.g., `'PROJ-100'`).
|
|
35
|
-
* @param epicTitle - The epic ticket title.
|
|
36
|
-
* @param childEntries - Progress entries for child tickets (with `prNumber`).
|
|
37
|
-
* @returns The epic PR body as a markdown string.
|
|
38
|
-
*/
|
|
39
|
-
export declare function buildEpicPrBody(epicKey: string, epicTitle: string, childEntries: ProgressEntry[]): string;
|
|
40
|
-
//# sourceMappingURL=pr-body.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pr-body.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/shared/pull-request/pr-body/pr-body.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAI1D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAmDR;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,aAAa,EAAE,GAC5B,MAAM,CAkBR"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check whether a target branch is an epic or milestone branch.
|
|
3
|
-
*
|
|
4
|
-
* @param targetBranch - The branch the PR targets.
|
|
5
|
-
* @returns `true` if it's an epic (`epic/`) or milestone (`milestone/`) branch.
|
|
6
|
-
*/
|
|
7
|
-
export function isEpicBranch(targetBranch) {
|
|
8
|
-
return (targetBranch.startsWith('epic/') || targetBranch.startsWith('milestone/'));
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Build the PR/MR body for a ticket.
|
|
12
|
-
*
|
|
13
|
-
* Includes a link back to the board ticket (auto-close for GitHub Issues
|
|
14
|
-
* when targeting the base branch, or "Part of" when targeting an epic branch)
|
|
15
|
-
* and a Clancy attribution footer.
|
|
16
|
-
*
|
|
17
|
-
* @param config - The board configuration.
|
|
18
|
-
* @param ticket - The ticket being implemented.
|
|
19
|
-
* @param targetBranch - The branch the PR targets (used to determine `Closes` vs `Part of`).
|
|
20
|
-
* @returns The PR body as a markdown string.
|
|
21
|
-
*/
|
|
22
|
-
export function buildPrBody(config, ticket, targetBranch) {
|
|
23
|
-
const lines = [];
|
|
24
|
-
const isEpic = targetBranch ? isEpicBranch(targetBranch) : false;
|
|
25
|
-
switch (config.provider) {
|
|
26
|
-
case 'github':
|
|
27
|
-
lines.push(isEpic ? `Part of ${ticket.key}` : `Closes ${ticket.key}`);
|
|
28
|
-
break;
|
|
29
|
-
case 'jira':
|
|
30
|
-
lines.push(`**Jira:** [${ticket.key}](${config.env.JIRA_BASE_URL}/browse/${ticket.key})`);
|
|
31
|
-
break;
|
|
32
|
-
case 'linear':
|
|
33
|
-
lines.push(`**Linear:** ${ticket.key}`);
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
lines.push('');
|
|
37
|
-
if (ticket.description) {
|
|
38
|
-
lines.push('## Description');
|
|
39
|
-
lines.push('');
|
|
40
|
-
lines.push(ticket.description);
|
|
41
|
-
lines.push('');
|
|
42
|
-
}
|
|
43
|
-
lines.push('---');
|
|
44
|
-
lines.push('*Created by [Clancy](https://github.com/Pushedskydiver/clancy)*');
|
|
45
|
-
lines.push('');
|
|
46
|
-
lines.push('---');
|
|
47
|
-
lines.push('<details>');
|
|
48
|
-
lines.push('<summary><strong>Rework instructions</strong> (click to expand)</summary>');
|
|
49
|
-
lines.push('');
|
|
50
|
-
lines.push('To request changes:');
|
|
51
|
-
lines.push('- **Code comments** — leave inline comments on specific lines. These are always picked up automatically.');
|
|
52
|
-
lines.push('- **General feedback** — reply with a comment starting with `Rework:` followed by what needs fixing. Comments without the `Rework:` prefix are treated as discussion.');
|
|
53
|
-
lines.push('');
|
|
54
|
-
lines.push("Example: `Rework: The form validation doesn't handle empty passwords`");
|
|
55
|
-
lines.push('');
|
|
56
|
-
lines.push('</details>');
|
|
57
|
-
return lines.join('\n');
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Build the PR body for the final epic PR (epic branch → base branch).
|
|
61
|
-
*
|
|
62
|
-
* Lists all child tickets with their PR numbers for traceability.
|
|
63
|
-
*
|
|
64
|
-
* @param epicKey - The epic ticket key (e.g., `'PROJ-100'`).
|
|
65
|
-
* @param epicTitle - The epic ticket title.
|
|
66
|
-
* @param childEntries - Progress entries for child tickets (with `prNumber`).
|
|
67
|
-
* @returns The epic PR body as a markdown string.
|
|
68
|
-
*/
|
|
69
|
-
export function buildEpicPrBody(epicKey, epicTitle, childEntries) {
|
|
70
|
-
const lines = [];
|
|
71
|
-
lines.push(`## ${epicKey} — ${epicTitle}`);
|
|
72
|
-
lines.push('');
|
|
73
|
-
lines.push('### Children');
|
|
74
|
-
lines.push('');
|
|
75
|
-
for (const entry of childEntries) {
|
|
76
|
-
const prRef = entry.prNumber ? ` (#${entry.prNumber})` : '';
|
|
77
|
-
lines.push(`- ${entry.key} — ${entry.summary}${prRef}`);
|
|
78
|
-
}
|
|
79
|
-
lines.push('');
|
|
80
|
-
lines.push('---');
|
|
81
|
-
lines.push('*Created by [Clancy](https://github.com/Pushedskydiver/clancy)*');
|
|
82
|
-
return lines.join('\n');
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=pr-body.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pr-body.js","sourceRoot":"","sources":["../../../../../src/scripts/shared/pull-request/pr-body/pr-body.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,YAAoB;IAC/C,OAAO,CACL,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAC1E,CAAC;AACJ,CAAC;AAED;;;;;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KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;IAE9E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rework comment detection and extraction utilities.
|
|
3
|
-
*
|
|
4
|
-
* Comments starting with "Rework:" (case-insensitive) are treated as
|
|
5
|
-
* rework requests. All other comments are treated as discussion and ignored.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Check if a comment is a rework request (starts with "Rework:" case-insensitive).
|
|
9
|
-
*
|
|
10
|
-
* @param body - The comment body to check.
|
|
11
|
-
* @returns `true` if the comment starts with "Rework:".
|
|
12
|
-
*/
|
|
13
|
-
export declare function isReworkComment(body: string): boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Extract the rework description from a "Rework: ..." comment.
|
|
16
|
-
*
|
|
17
|
-
* Strips the "Rework:" prefix and returns the remaining content trimmed.
|
|
18
|
-
*
|
|
19
|
-
* @param body - The full comment body starting with "Rework:".
|
|
20
|
-
* @returns The description after the prefix.
|
|
21
|
-
*/
|
|
22
|
-
export declare function extractReworkContent(body: string): string;
|
|
23
|
-
//# sourceMappingURL=rework-comment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rework-comment.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/shared/pull-request/rework-comment/rework-comment.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKzD"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rework comment detection and extraction utilities.
|
|
3
|
-
*
|
|
4
|
-
* Comments starting with "Rework:" (case-insensitive) are treated as
|
|
5
|
-
* rework requests. All other comments are treated as discussion and ignored.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Check if a comment is a rework request (starts with "Rework:" case-insensitive).
|
|
9
|
-
*
|
|
10
|
-
* @param body - The comment body to check.
|
|
11
|
-
* @returns `true` if the comment starts with "Rework:".
|
|
12
|
-
*/
|
|
13
|
-
export function isReworkComment(body) {
|
|
14
|
-
return body.trim().toLowerCase().startsWith('rework:');
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Extract the rework description from a "Rework: ..." comment.
|
|
18
|
-
*
|
|
19
|
-
* Strips the "Rework:" prefix and returns the remaining content trimmed.
|
|
20
|
-
*
|
|
21
|
-
* @param body - The full comment body starting with "Rework:".
|
|
22
|
-
* @returns The description after the prefix.
|
|
23
|
-
*/
|
|
24
|
-
export function extractReworkContent(body) {
|
|
25
|
-
return body
|
|
26
|
-
.trim()
|
|
27
|
-
.replace(/^rework:\s*/i, '')
|
|
28
|
-
.trim();
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=rework-comment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rework-comment.js","sourceRoot":"","sources":["../../../../../src/scripts/shared/pull-request/rework-comment/rework-comment.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,IAAI;SACR,IAAI,EAAE;SACN,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;SAC3B,IAAI,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { GitPlatform, RemoteInfo } from '../../../types/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Parse a git remote URL into platform-specific info.
|
|
4
|
-
*
|
|
5
|
-
* Supports HTTPS, SSH, and SSH-URL formats for GitHub, GitLab, Bitbucket
|
|
6
|
-
* (Cloud and Server), Azure DevOps, and self-hosted instances.
|
|
7
|
-
*
|
|
8
|
-
* @param rawUrl - The raw git remote URL.
|
|
9
|
-
* @returns Parsed remote info with platform and path details.
|
|
10
|
-
*/
|
|
11
|
-
export declare function parseRemote(rawUrl: string): RemoteInfo;
|
|
12
|
-
/**
|
|
13
|
-
* Detect the git hosting platform from a hostname.
|
|
14
|
-
*
|
|
15
|
-
* Uses known domain patterns. Self-hosted instances with custom domains
|
|
16
|
-
* (e.g. `git.acme.com`) fall through to 'unknown' — use `CLANCY_GIT_PLATFORM`
|
|
17
|
-
* env var to override.
|
|
18
|
-
*
|
|
19
|
-
* @param hostname - The hostname from the remote URL.
|
|
20
|
-
* @returns The detected platform.
|
|
21
|
-
*/
|
|
22
|
-
export declare function detectPlatformFromHostname(hostname: string): GitPlatform;
|
|
23
|
-
/**
|
|
24
|
-
* Detect the remote origin info from the current git repository.
|
|
25
|
-
*
|
|
26
|
-
* Falls back to `{ host: 'none' }` if no remote is configured or
|
|
27
|
-
* if the command fails.
|
|
28
|
-
*
|
|
29
|
-
* @param platformOverride - Override platform detection (from `CLANCY_GIT_PLATFORM` env var).
|
|
30
|
-
* @returns Parsed remote info.
|
|
31
|
-
*/
|
|
32
|
-
export declare function detectRemote(platformOverride?: string): RemoteInfo;
|
|
33
|
-
/**
|
|
34
|
-
* Build the API base URL for a given remote.
|
|
35
|
-
*
|
|
36
|
-
* @param remote - The parsed remote info.
|
|
37
|
-
* @param apiUrlOverride - Override from `CLANCY_GIT_API_URL` env var.
|
|
38
|
-
* @returns The API base URL, or undefined if not applicable.
|
|
39
|
-
*/
|
|
40
|
-
export declare function buildApiBaseUrl(remote: RemoteInfo, apiUrlOverride?: string): string | undefined;
|
|
41
|
-
//# sourceMappingURL=remote.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../../src/scripts/shared/remote/remote.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAgChE;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAgEtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAWxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,UAAU,CAmBlE;AAgED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,EAClB,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM,GAAG,SAAS,CAiBpB"}
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Remote git host detection.
|
|
3
|
-
*
|
|
4
|
-
* Parses `git remote get-url origin` to detect the hosting platform
|
|
5
|
-
* (GitHub, GitLab, Bitbucket, etc.) and extract owner/repo/project info.
|
|
6
|
-
*/
|
|
7
|
-
import { execFileSync } from 'node:child_process';
|
|
8
|
-
/**
|
|
9
|
-
* Extract hostname and path from a raw git remote URL.
|
|
10
|
-
*
|
|
11
|
-
* Strips `.git` suffix, then tries SSH (`git@host:path`) and
|
|
12
|
-
* HTTPS/SSH-URL (`https://host/path`, `ssh://git@host/path`) formats.
|
|
13
|
-
*
|
|
14
|
-
* @param rawUrl - The raw git remote URL.
|
|
15
|
-
* @returns The extracted hostname and path, or `undefined` if unparseable.
|
|
16
|
-
*/
|
|
17
|
-
function extractHostAndPath(rawUrl) {
|
|
18
|
-
const url = rawUrl.trim().replace(/\.git$/, '');
|
|
19
|
-
// SSH format: git@<host>:<path>
|
|
20
|
-
const sshMatch = url.match(/^git@([^:]+):(.+)$/);
|
|
21
|
-
// HTTPS or SSH-URL format: https://<host>/<path> or ssh://git@<host>/<path>
|
|
22
|
-
const httpsMatch = url.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/:]+)(?::\d+)?\/(.+)$/);
|
|
23
|
-
const hostname = sshMatch?.[1] ?? httpsMatch?.[1];
|
|
24
|
-
const path = sshMatch?.[2] ?? httpsMatch?.[2];
|
|
25
|
-
if (!hostname || !path)
|
|
26
|
-
return undefined;
|
|
27
|
-
return { hostname, path };
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Parse a git remote URL into platform-specific info.
|
|
31
|
-
*
|
|
32
|
-
* Supports HTTPS, SSH, and SSH-URL formats for GitHub, GitLab, Bitbucket
|
|
33
|
-
* (Cloud and Server), Azure DevOps, and self-hosted instances.
|
|
34
|
-
*
|
|
35
|
-
* @param rawUrl - The raw git remote URL.
|
|
36
|
-
* @returns Parsed remote info with platform and path details.
|
|
37
|
-
*/
|
|
38
|
-
export function parseRemote(rawUrl) {
|
|
39
|
-
const extracted = extractHostAndPath(rawUrl);
|
|
40
|
-
if (!extracted) {
|
|
41
|
-
return { host: 'unknown', url: rawUrl };
|
|
42
|
-
}
|
|
43
|
-
const { hostname, path } = extracted;
|
|
44
|
-
const platform = detectPlatformFromHostname(hostname);
|
|
45
|
-
switch (platform) {
|
|
46
|
-
case 'github': {
|
|
47
|
-
const parts = path.split('/');
|
|
48
|
-
if (parts.length >= 2) {
|
|
49
|
-
return {
|
|
50
|
-
host: 'github',
|
|
51
|
-
owner: parts[0],
|
|
52
|
-
repo: parts[1],
|
|
53
|
-
hostname,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
return { host: 'unknown', url: rawUrl };
|
|
57
|
-
}
|
|
58
|
-
case 'gitlab': {
|
|
59
|
-
return {
|
|
60
|
-
host: 'gitlab',
|
|
61
|
-
projectPath: path,
|
|
62
|
-
hostname,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
case 'bitbucket': {
|
|
66
|
-
// Bitbucket Server uses /scm/<projectKey>/<repo> format
|
|
67
|
-
const scmMatch = path.match(/^scm\/([^/]+)\/(.+)$/);
|
|
68
|
-
if (scmMatch) {
|
|
69
|
-
return {
|
|
70
|
-
host: 'bitbucket-server',
|
|
71
|
-
projectKey: scmMatch[1],
|
|
72
|
-
repoSlug: scmMatch[2],
|
|
73
|
-
hostname,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
// Bitbucket Cloud: <workspace>/<repo>
|
|
77
|
-
const parts = path.split('/');
|
|
78
|
-
if (parts.length >= 2) {
|
|
79
|
-
return {
|
|
80
|
-
host: 'bitbucket',
|
|
81
|
-
workspace: parts[0],
|
|
82
|
-
repoSlug: parts[1],
|
|
83
|
-
hostname,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
return { host: 'unknown', url: rawUrl };
|
|
87
|
-
}
|
|
88
|
-
case 'azure':
|
|
89
|
-
return { host: 'azure', url: rawUrl };
|
|
90
|
-
default:
|
|
91
|
-
return { host: 'unknown', url: rawUrl };
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Detect the git hosting platform from a hostname.
|
|
96
|
-
*
|
|
97
|
-
* Uses known domain patterns. Self-hosted instances with custom domains
|
|
98
|
-
* (e.g. `git.acme.com`) fall through to 'unknown' — use `CLANCY_GIT_PLATFORM`
|
|
99
|
-
* env var to override.
|
|
100
|
-
*
|
|
101
|
-
* @param hostname - The hostname from the remote URL.
|
|
102
|
-
* @returns The detected platform.
|
|
103
|
-
*/
|
|
104
|
-
export function detectPlatformFromHostname(hostname) {
|
|
105
|
-
const lower = hostname.toLowerCase();
|
|
106
|
-
if (lower === 'github.com' || lower.includes('github'))
|
|
107
|
-
return 'github';
|
|
108
|
-
if (lower === 'gitlab.com' || lower.includes('gitlab'))
|
|
109
|
-
return 'gitlab';
|
|
110
|
-
if (lower === 'bitbucket.org' || lower.includes('bitbucket'))
|
|
111
|
-
return 'bitbucket';
|
|
112
|
-
if (lower.includes('dev.azure') || lower.includes('visualstudio'))
|
|
113
|
-
return 'azure';
|
|
114
|
-
return 'unknown';
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Detect the remote origin info from the current git repository.
|
|
118
|
-
*
|
|
119
|
-
* Falls back to `{ host: 'none' }` if no remote is configured or
|
|
120
|
-
* if the command fails.
|
|
121
|
-
*
|
|
122
|
-
* @param platformOverride - Override platform detection (from `CLANCY_GIT_PLATFORM` env var).
|
|
123
|
-
* @returns Parsed remote info.
|
|
124
|
-
*/
|
|
125
|
-
export function detectRemote(platformOverride) {
|
|
126
|
-
let rawUrl;
|
|
127
|
-
try {
|
|
128
|
-
rawUrl = execFileSync('git', ['remote', 'get-url', 'origin'], {
|
|
129
|
-
encoding: 'utf8',
|
|
130
|
-
}).trim();
|
|
131
|
-
}
|
|
132
|
-
catch {
|
|
133
|
-
return { host: 'none' };
|
|
134
|
-
}
|
|
135
|
-
if (!rawUrl)
|
|
136
|
-
return { host: 'none' };
|
|
137
|
-
// If user explicitly overrides the platform, always use it — they know better
|
|
138
|
-
if (platformOverride) {
|
|
139
|
-
return overrideRemotePlatform(rawUrl, platformOverride);
|
|
140
|
-
}
|
|
141
|
-
return parseRemote(rawUrl);
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Re-parse a remote URL with a known platform override.
|
|
145
|
-
*
|
|
146
|
-
* Used when auto-detection fails (self-hosted with custom domain)
|
|
147
|
-
* and the user sets `CLANCY_GIT_PLATFORM`.
|
|
148
|
-
*/
|
|
149
|
-
function overrideRemotePlatform(rawUrl, platform) {
|
|
150
|
-
const extracted = extractHostAndPath(rawUrl);
|
|
151
|
-
if (!extracted)
|
|
152
|
-
return { host: 'unknown', url: rawUrl };
|
|
153
|
-
const { hostname, path } = extracted;
|
|
154
|
-
switch (platform.toLowerCase()) {
|
|
155
|
-
case 'github': {
|
|
156
|
-
const parts = path.split('/');
|
|
157
|
-
if (parts.length >= 2) {
|
|
158
|
-
return { host: 'github', owner: parts[0], repo: parts[1], hostname };
|
|
159
|
-
}
|
|
160
|
-
return { host: 'unknown', url: rawUrl };
|
|
161
|
-
}
|
|
162
|
-
case 'gitlab':
|
|
163
|
-
return { host: 'gitlab', projectPath: path, hostname };
|
|
164
|
-
case 'bitbucket': {
|
|
165
|
-
const parts = path.split('/');
|
|
166
|
-
if (parts.length >= 2) {
|
|
167
|
-
return {
|
|
168
|
-
host: 'bitbucket',
|
|
169
|
-
workspace: parts[0],
|
|
170
|
-
repoSlug: parts[1],
|
|
171
|
-
hostname,
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
return { host: 'unknown', url: rawUrl };
|
|
175
|
-
}
|
|
176
|
-
case 'bitbucket-server': {
|
|
177
|
-
// Strip leading scm/ prefix used in Bitbucket Server URLs
|
|
178
|
-
const scmMatch = path.match(/^scm\/([^/]+)\/(.+)$/);
|
|
179
|
-
if (scmMatch) {
|
|
180
|
-
return {
|
|
181
|
-
host: 'bitbucket-server',
|
|
182
|
-
projectKey: scmMatch[1],
|
|
183
|
-
repoSlug: scmMatch[2],
|
|
184
|
-
hostname,
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
const parts = path.split('/');
|
|
188
|
-
if (parts.length >= 2) {
|
|
189
|
-
return {
|
|
190
|
-
host: 'bitbucket-server',
|
|
191
|
-
projectKey: parts[0],
|
|
192
|
-
repoSlug: parts[1],
|
|
193
|
-
hostname,
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
return { host: 'unknown', url: rawUrl };
|
|
197
|
-
}
|
|
198
|
-
default:
|
|
199
|
-
return { host: 'unknown', url: rawUrl };
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Build the API base URL for a given remote.
|
|
204
|
-
*
|
|
205
|
-
* @param remote - The parsed remote info.
|
|
206
|
-
* @param apiUrlOverride - Override from `CLANCY_GIT_API_URL` env var.
|
|
207
|
-
* @returns The API base URL, or undefined if not applicable.
|
|
208
|
-
*/
|
|
209
|
-
export function buildApiBaseUrl(remote, apiUrlOverride) {
|
|
210
|
-
if (apiUrlOverride)
|
|
211
|
-
return apiUrlOverride.replace(/\/$/, '');
|
|
212
|
-
switch (remote.host) {
|
|
213
|
-
case 'github':
|
|
214
|
-
return remote.hostname === 'github.com'
|
|
215
|
-
? 'https://api.github.com'
|
|
216
|
-
: `https://${remote.hostname}/api/v3`;
|
|
217
|
-
case 'gitlab':
|
|
218
|
-
return `https://${remote.hostname}/api/v4`;
|
|
219
|
-
case 'bitbucket':
|
|
220
|
-
return 'https://api.bitbucket.org/2.0';
|
|
221
|
-
case 'bitbucket-server':
|
|
222
|
-
return `https://${remote.hostname}/rest/api/1.0`;
|
|
223
|
-
default:
|
|
224
|
-
return undefined;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
//# sourceMappingURL=remote.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../src/scripts/shared/remote/remote.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;;;;;;GAQG;AACH,SAAS,kBAAkB,CACzB,MAAc;IAEd,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAEhD,gCAAgC;IAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAEjD,4EAA4E;IAC5E,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAC1B,yDAAyD,CAC1D,CAAC;IAEF,MAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU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AC,CAAC;oBAClB,QAAQ;iBACT,CAAC;YACJ,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;QAC1C,CAAC;QACD;YACE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;IAC5C,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAkB,EAClB,cAAuB;IAEvB,IAAI,cAAc;QAAE,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAE7D,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC,QAAQ,KAAK,YAAY;gBACrC,CAAC,CAAC,wBAAwB;gBAC1B,CAAC,CAAC,WAAW,MAAM,CAAC,QAAQ,SAAS,CAAC;QAC1C,KAAK,QAAQ;YACX,OAAO,WAAW,MAAM,CAAC,QAAQ,SAAS,CAAC;QAC7C,KAAK,WAAW;YACd,OAAO,+BAA+B,CAAC;QACzC,KAAK,kBAAkB;YACrB,OAAO,WAAW,MAAM,CAAC,QAAQ,eAAe,CAAC;QACnD;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC"}
|
package/dist/types/board.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Board-related types shared across board scripts.
|
|
3
|
-
*/
|
|
4
|
-
/** Supported board providers. */
|
|
5
|
-
export type BoardProvider = 'jira' | 'github' | 'linear';
|
|
6
|
-
/** A normalised ticket from any board provider. */
|
|
7
|
-
export type Ticket = {
|
|
8
|
-
key: string;
|
|
9
|
-
title: string;
|
|
10
|
-
description: string;
|
|
11
|
-
provider: BoardProvider;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=board.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../src/types/board.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iCAAiC;AACjC,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEzD,mDAAmD;AACnD,MAAM,MAAM,MAAM,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC"}
|
package/dist/types/board.js
DELETED
package/dist/types/board.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"board.js","sourceRoot":"","sources":["../../src/types/board.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export type { BoardProvider, Ticket } from './board.js';
|
|
2
|
-
export type { GitPlatform, PrCreationResult, PrReviewState, ProgressStatus, RemoteInfo, } from './remote.js';
|
|
3
|
-
export type { BoardConfig, GitHubEnv, JiraEnv, LinearEnv, SharedEnv, } from '../schemas/env.js';
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACxD,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,WAAW,EACX,SAAS,EACT,OAAO,EACP,SAAS,EACT,SAAS,GACV,MAAM,kBAAkB,CAAC"}
|
package/dist/types/index.js
DELETED
package/dist/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
|
package/dist/types/remote.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Remote git hosting types shared across remote detection and PR creation.
|
|
3
|
-
*/
|
|
4
|
-
/** Supported git hosting platforms. */
|
|
5
|
-
export type GitPlatform = 'github' | 'gitlab' | 'bitbucket' | 'bitbucket-server' | 'azure' | 'unknown';
|
|
6
|
-
/** Parsed remote URL with platform and path info. */
|
|
7
|
-
export type RemoteInfo = {
|
|
8
|
-
host: 'github';
|
|
9
|
-
owner: string;
|
|
10
|
-
repo: string;
|
|
11
|
-
hostname: string;
|
|
12
|
-
} | {
|
|
13
|
-
host: 'gitlab';
|
|
14
|
-
projectPath: string;
|
|
15
|
-
hostname: string;
|
|
16
|
-
} | {
|
|
17
|
-
host: 'bitbucket';
|
|
18
|
-
workspace: string;
|
|
19
|
-
repoSlug: string;
|
|
20
|
-
hostname: string;
|
|
21
|
-
} | {
|
|
22
|
-
host: 'bitbucket-server';
|
|
23
|
-
projectKey: string;
|
|
24
|
-
repoSlug: string;
|
|
25
|
-
hostname: string;
|
|
26
|
-
} | {
|
|
27
|
-
host: 'azure' | 'unknown';
|
|
28
|
-
url: string;
|
|
29
|
-
} | {
|
|
30
|
-
host: 'none';
|
|
31
|
-
};
|
|
32
|
-
/** Result of a PR/MR creation attempt. */
|
|
33
|
-
export type PrCreationResult = {
|
|
34
|
-
ok: true;
|
|
35
|
-
url: string;
|
|
36
|
-
number: number;
|
|
37
|
-
} | {
|
|
38
|
-
ok: false;
|
|
39
|
-
error: string;
|
|
40
|
-
alreadyExists?: boolean;
|
|
41
|
-
};
|
|
42
|
-
/** Result of checking PR/MR review state. */
|
|
43
|
-
export type PrReviewState = {
|
|
44
|
-
/** Whether changes have been requested by a reviewer. */
|
|
45
|
-
changesRequested: boolean;
|
|
46
|
-
/** The PR/MR number/ID (needed to fetch comments). */
|
|
47
|
-
prNumber: number;
|
|
48
|
-
/** The PR/MR URL (for logging). */
|
|
49
|
-
prUrl: string;
|
|
50
|
-
/** Usernames of reviewers who requested changes (GitHub only). */
|
|
51
|
-
reviewers?: string[];
|
|
52
|
-
};
|
|
53
|
-
/** Progress log status values. */
|
|
54
|
-
export type ProgressStatus = 'DONE' | 'SKIPPED' | 'PR_CREATED' | 'PUSHED' | 'PUSH_FAILED' | 'LOCAL' | 'PLAN' | 'APPROVE_PLAN' | 'REWORK' | 'EPIC_PR_CREATED' | 'BRIEF' | 'APPROVE_BRIEF';
|
|
55
|
-
//# sourceMappingURL=remote.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/types/remote.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,uCAAuC;AACvC,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,kBAAkB,GAClB,OAAO,GACP,SAAS,CAAC;AAEd,qDAAqD;AACrD,MAAM,MAAM,UAAU,GAClB;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,GACD;IACE,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,GACD;IACE,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;CACb,GACD;IACE,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,0CAA0C;AAC1C,MAAM,MAAM,gBAAgB,GACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1D,6CAA6C;AAC7C,MAAM,MAAM,aAAa,GAAG;IAC1B,yDAAyD;IACzD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,kCAAkC;AAClC,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,aAAa,GACb,OAAO,GACP,MAAM,GACN,cAAc,GACd,QAAQ,GACR,iBAAiB,GACjB,OAAO,GACP,eAAe,CAAC"}
|
package/dist/types/remote.js
DELETED
package/dist/types/remote.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/types/remote.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Safely parse a JSON string, returning `undefined` on failure.
|
|
3
|
-
*
|
|
4
|
-
* Hooks and scripts receive JSON from external sources — this helper
|
|
5
|
-
* avoids try/catch boilerplate and never throws.
|
|
6
|
-
*
|
|
7
|
-
* @param raw - The JSON string to parse.
|
|
8
|
-
* @returns The parsed value cast to `T`, or `undefined` if parsing fails.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const data = parseJson<{ name: string }>('{"name":"clancy"}');
|
|
13
|
-
* // data?.name === 'clancy'
|
|
14
|
-
*
|
|
15
|
-
* const bad = parseJson('not json');
|
|
16
|
-
* // bad === undefined
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export declare function parseJson<T = unknown>(raw: string): T | undefined;
|
|
20
|
-
//# sourceMappingURL=parse-json.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-json.d.ts","sourceRoot":"","sources":["../../../src/utils/parse-json/parse-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAMjE"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Safely parse a JSON string, returning `undefined` on failure.
|
|
3
|
-
*
|
|
4
|
-
* Hooks and scripts receive JSON from external sources — this helper
|
|
5
|
-
* avoids try/catch boilerplate and never throws.
|
|
6
|
-
*
|
|
7
|
-
* @param raw - The JSON string to parse.
|
|
8
|
-
* @returns The parsed value cast to `T`, or `undefined` if parsing fails.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const data = parseJson<{ name: string }>('{"name":"clancy"}');
|
|
13
|
-
* // data?.name === 'clancy'
|
|
14
|
-
*
|
|
15
|
-
* const bad = parseJson('not json');
|
|
16
|
-
* // bad === undefined
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export function parseJson(raw) {
|
|
20
|
-
try {
|
|
21
|
-
return JSON.parse(raw);
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=parse-json.js.map
|