chief-clancy 0.5.3 → 0.5.5
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 -3
- package/dist/bundle/clancy-afk.js +2 -2
- package/dist/bundle/clancy-once.js +54 -28
- package/dist/schemas/bitbucket-pr.d.ts +122 -0
- package/dist/schemas/bitbucket-pr.d.ts.map +1 -0
- package/dist/schemas/bitbucket-pr.js +69 -0
- package/dist/schemas/bitbucket-pr.js.map +1 -0
- package/dist/schemas/env.d.ts +31 -0
- package/dist/schemas/env.d.ts.map +1 -1
- package/dist/schemas/env.js +10 -0
- package/dist/schemas/env.js.map +1 -1
- package/dist/schemas/github.d.ts +60 -0
- package/dist/schemas/github.d.ts.map +1 -1
- package/dist/schemas/github.js +32 -0
- package/dist/schemas/github.js.map +1 -1
- package/dist/schemas/gitlab-mr.d.ts +62 -0
- package/dist/schemas/gitlab-mr.d.ts.map +1 -0
- package/dist/schemas/gitlab-mr.js +31 -0
- package/dist/schemas/gitlab-mr.js.map +1 -0
- package/dist/scripts/afk/afk.d.ts.map +1 -1
- package/dist/scripts/afk/afk.js +1 -8
- package/dist/scripts/afk/afk.js.map +1 -1
- package/dist/scripts/board/github/github.d.ts.map +1 -1
- package/dist/scripts/board/github/github.js +1 -2
- package/dist/scripts/board/github/github.js.map +1 -1
- package/dist/scripts/board/linear/linear.d.ts.map +1 -1
- package/dist/scripts/board/linear/linear.js +35 -4
- package/dist/scripts/board/linear/linear.js.map +1 -1
- package/dist/scripts/once/once.d.ts.map +1 -1
- package/dist/scripts/once/once.js +381 -53
- package/dist/scripts/once/once.js.map +1 -1
- package/dist/scripts/shared/env-schema/env-schema.d.ts.map +1 -1
- package/dist/scripts/shared/env-schema/env-schema.js +3 -2
- package/dist/scripts/shared/env-schema/env-schema.js.map +1 -1
- package/dist/scripts/shared/format/format.d.ts +11 -0
- package/dist/scripts/shared/format/format.d.ts.map +1 -0
- package/dist/scripts/shared/format/format.js +18 -0
- package/dist/scripts/shared/format/format.js.map +1 -0
- package/dist/scripts/shared/git-ops/git-ops.d.ts +18 -0
- package/dist/scripts/shared/git-ops/git-ops.d.ts.map +1 -1
- package/dist/scripts/shared/git-ops/git-ops.js +40 -0
- package/dist/scripts/shared/git-ops/git-ops.js.map +1 -1
- package/dist/scripts/shared/http/http.d.ts +2 -0
- package/dist/scripts/shared/http/http.d.ts.map +1 -1
- package/dist/scripts/shared/http/http.js +2 -0
- package/dist/scripts/shared/http/http.js.map +1 -1
- package/dist/scripts/shared/progress/progress.d.ts +44 -2
- package/dist/scripts/shared/progress/progress.d.ts.map +1 -1
- package/dist/scripts/shared/progress/progress.js +97 -2
- package/dist/scripts/shared/progress/progress.js.map +1 -1
- package/dist/scripts/shared/prompt/prompt.d.ts +27 -0
- package/dist/scripts/shared/prompt/prompt.d.ts.map +1 -1
- package/dist/scripts/shared/prompt/prompt.js +32 -7
- package/dist/scripts/shared/prompt/prompt.js.map +1 -1
- package/dist/scripts/shared/pull-request/bitbucket/bitbucket.d.ts +70 -0
- package/dist/scripts/shared/pull-request/bitbucket/bitbucket.d.ts.map +1 -0
- package/dist/scripts/shared/pull-request/bitbucket/bitbucket.js +251 -0
- package/dist/scripts/shared/pull-request/bitbucket/bitbucket.js.map +1 -0
- package/dist/scripts/shared/pull-request/github/github.d.ts +48 -0
- package/dist/scripts/shared/pull-request/github/github.d.ts.map +1 -0
- package/dist/scripts/shared/pull-request/github/github.js +133 -0
- package/dist/scripts/shared/pull-request/github/github.js.map +1 -0
- package/dist/scripts/shared/pull-request/gitlab/gitlab.d.ts +46 -0
- package/dist/scripts/shared/pull-request/gitlab/gitlab.d.ts.map +1 -0
- package/dist/scripts/shared/pull-request/gitlab/gitlab.js +154 -0
- package/dist/scripts/shared/pull-request/gitlab/gitlab.js.map +1 -0
- package/dist/scripts/shared/pull-request/post-pr/post-pr.d.ts +31 -0
- package/dist/scripts/shared/pull-request/post-pr/post-pr.d.ts.map +1 -0
- package/dist/scripts/shared/pull-request/post-pr/post-pr.js +61 -0
- package/dist/scripts/shared/pull-request/post-pr/post-pr.js.map +1 -0
- package/dist/scripts/shared/pull-request/pr-body/pr-body.d.ts +19 -0
- package/dist/scripts/shared/pull-request/pr-body/pr-body.d.ts.map +1 -0
- package/dist/scripts/shared/pull-request/pr-body/pr-body.js +42 -0
- package/dist/scripts/shared/pull-request/pr-body/pr-body.js.map +1 -0
- package/dist/scripts/shared/pull-request/rework-comment/rework-comment.d.ts +23 -0
- package/dist/scripts/shared/pull-request/rework-comment/rework-comment.d.ts.map +1 -0
- package/dist/scripts/shared/pull-request/rework-comment/rework-comment.js +30 -0
- package/dist/scripts/shared/pull-request/rework-comment/rework-comment.js.map +1 -0
- package/dist/scripts/shared/remote/remote.d.ts +41 -0
- package/dist/scripts/shared/remote/remote.d.ts.map +1 -0
- package/dist/scripts/shared/remote/remote.js +227 -0
- package/dist/scripts/shared/remote/remote.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/remote.d.ts +53 -0
- package/dist/types/remote.d.ts.map +1 -0
- package/dist/types/remote.js +5 -0
- package/dist/types/remote.js.map +1 -0
- package/package.json +1 -1
- package/src/roles/setup/workflows/init.md +106 -0
- package/src/roles/setup/workflows/scaffold.md +45 -0
- package/src/roles/setup/workflows/settings.md +81 -4
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitLab merge request creation and review state checking.
|
|
3
|
+
*
|
|
4
|
+
* Uses the GitLab REST API v4 to create merge requests, check review state,
|
|
5
|
+
* and fetch review comments.
|
|
6
|
+
* Supports both gitlab.com and self-hosted instances.
|
|
7
|
+
*
|
|
8
|
+
* Auth: `PRIVATE-TOKEN` header (personal access token with `api` scope).
|
|
9
|
+
*/
|
|
10
|
+
import { gitlabDiscussionsSchema, gitlabMrListSchema, } from '../../../../schemas/gitlab-mr.js';
|
|
11
|
+
import { postPullRequest } from '../post-pr/post-pr.js';
|
|
12
|
+
import { extractReworkContent, isReworkComment, } from '../rework-comment/rework-comment.js';
|
|
13
|
+
/**
|
|
14
|
+
* Create a merge request on GitLab.
|
|
15
|
+
*
|
|
16
|
+
* @param token - The GitLab personal access token.
|
|
17
|
+
* @param apiBase - The API base URL (e.g. `https://gitlab.com/api/v4`).
|
|
18
|
+
* @param projectPath - The raw project path (e.g. `group/subgroup/project`). URL-encoded internally.
|
|
19
|
+
* @param sourceBranch - The source branch name.
|
|
20
|
+
* @param targetBranch - The target branch name.
|
|
21
|
+
* @param title - The MR title.
|
|
22
|
+
* @param description - The MR body (markdown).
|
|
23
|
+
* @returns A result with the MR URL and IID on success, or an error message.
|
|
24
|
+
*/
|
|
25
|
+
export async function createMergeRequest(token, apiBase, projectPath, sourceBranch, targetBranch, title, description) {
|
|
26
|
+
const encodedPath = encodeURIComponent(projectPath);
|
|
27
|
+
return postPullRequest(`${apiBase}/projects/${encodedPath}/merge_requests`, { 'PRIVATE-TOKEN': token }, {
|
|
28
|
+
source_branch: sourceBranch,
|
|
29
|
+
target_branch: targetBranch,
|
|
30
|
+
title,
|
|
31
|
+
description,
|
|
32
|
+
remove_source_branch: true,
|
|
33
|
+
}, (json) => {
|
|
34
|
+
const data = json;
|
|
35
|
+
return { url: data.web_url ?? '', number: data.iid ?? 0 };
|
|
36
|
+
}, (status, text) => status === 409 && text.includes('already exists'));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check the review state of an open MR for a given branch.
|
|
40
|
+
*
|
|
41
|
+
* Finds the open MR matching the source branch, fetches all discussions.
|
|
42
|
+
* Inline notes (type `DiffNote`) always trigger rework. General conversation
|
|
43
|
+
* notes only trigger rework when prefixed with `Rework:`.
|
|
44
|
+
*
|
|
45
|
+
* @param token - The GitLab personal access token.
|
|
46
|
+
* @param apiBase - The API base URL (e.g. `https://gitlab.com/api/v4`).
|
|
47
|
+
* @param projectPath - The raw project path (e.g. `group/subgroup/project`). URL-encoded internally.
|
|
48
|
+
* @param branch - The source branch to look up.
|
|
49
|
+
* @param since - ISO 8601 timestamp; only notes created after this time trigger rework.
|
|
50
|
+
* @returns The review state if an open MR exists, otherwise `undefined`.
|
|
51
|
+
*/
|
|
52
|
+
export async function checkMrReviewState(token, apiBase, projectPath, branch, since) {
|
|
53
|
+
try {
|
|
54
|
+
const encodedPath = encodeURIComponent(projectPath);
|
|
55
|
+
const mrUrl = `${apiBase}/projects/${encodedPath}/merge_requests?source_branch=${branch}&state=opened`;
|
|
56
|
+
const mrRes = await fetch(mrUrl, {
|
|
57
|
+
headers: { 'PRIVATE-TOKEN': token },
|
|
58
|
+
});
|
|
59
|
+
if (!mrRes.ok)
|
|
60
|
+
return undefined;
|
|
61
|
+
const data = gitlabMrListSchema.parse(await mrRes.json());
|
|
62
|
+
if (data.length === 0)
|
|
63
|
+
return undefined;
|
|
64
|
+
const mr = data[0];
|
|
65
|
+
const discussionsUrl = `${apiBase}/projects/${encodedPath}/merge_requests/${mr.iid}/discussions?per_page=100`;
|
|
66
|
+
const discussionsRes = await fetch(discussionsUrl, {
|
|
67
|
+
headers: { 'PRIVATE-TOKEN': token },
|
|
68
|
+
});
|
|
69
|
+
if (!discussionsRes.ok)
|
|
70
|
+
return undefined;
|
|
71
|
+
const discussions = gitlabDiscussionsSchema.parse(await discussionsRes.json());
|
|
72
|
+
let hasRework = false;
|
|
73
|
+
for (const discussion of discussions) {
|
|
74
|
+
for (const note of discussion.notes) {
|
|
75
|
+
if (note.system)
|
|
76
|
+
continue;
|
|
77
|
+
if (since && note.created_at && note.created_at <= since)
|
|
78
|
+
continue;
|
|
79
|
+
if (note.type === 'DiffNote' &&
|
|
80
|
+
note.resolvable !== false &&
|
|
81
|
+
note.resolved !== true) {
|
|
82
|
+
hasRework = true;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
if (isReworkComment(note.body)) {
|
|
86
|
+
hasRework = true;
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (hasRework)
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
changesRequested: hasRework,
|
|
95
|
+
prNumber: mr.iid,
|
|
96
|
+
prUrl: mr.web_url,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Fetch feedback comments from an MR's discussions.
|
|
105
|
+
*
|
|
106
|
+
* Inline notes (type `DiffNote`) are always included — they inherently
|
|
107
|
+
* represent change requests. General conversation notes are only included
|
|
108
|
+
* when they start with `Rework:` (case-insensitive), with the prefix
|
|
109
|
+
* stripped. Inline notes are prefixed with `[new_path]` when available.
|
|
110
|
+
*
|
|
111
|
+
* @param token - The GitLab personal access token.
|
|
112
|
+
* @param apiBase - The API base URL (e.g. `https://gitlab.com/api/v4`).
|
|
113
|
+
* @param projectPath - The raw project path. URL-encoded internally.
|
|
114
|
+
* @param mrIid - The MR internal ID (iid).
|
|
115
|
+
* @param since - ISO 8601 timestamp; only notes created after this time are returned.
|
|
116
|
+
* @returns An array of feedback descriptions.
|
|
117
|
+
*/
|
|
118
|
+
export async function fetchMrReviewComments(token, apiBase, projectPath, mrIid, since) {
|
|
119
|
+
try {
|
|
120
|
+
const encodedPath = encodeURIComponent(projectPath);
|
|
121
|
+
const url = `${apiBase}/projects/${encodedPath}/merge_requests/${mrIid}/discussions?per_page=100`;
|
|
122
|
+
const res = await fetch(url, {
|
|
123
|
+
headers: { 'PRIVATE-TOKEN': token },
|
|
124
|
+
});
|
|
125
|
+
if (!res.ok)
|
|
126
|
+
return [];
|
|
127
|
+
const discussions = gitlabDiscussionsSchema.parse(await res.json());
|
|
128
|
+
const comments = [];
|
|
129
|
+
for (const discussion of discussions) {
|
|
130
|
+
for (const note of discussion.notes) {
|
|
131
|
+
if (note.system)
|
|
132
|
+
continue;
|
|
133
|
+
if (since && note.created_at && note.created_at <= since)
|
|
134
|
+
continue;
|
|
135
|
+
if (note.type === 'DiffNote' &&
|
|
136
|
+
note.resolvable !== false &&
|
|
137
|
+
note.resolved !== true) {
|
|
138
|
+
const prefix = note.position?.new_path
|
|
139
|
+
? `[${note.position.new_path}] `
|
|
140
|
+
: '';
|
|
141
|
+
comments.push(`${prefix}${note.body}`);
|
|
142
|
+
}
|
|
143
|
+
else if (isReworkComment(note.body)) {
|
|
144
|
+
comments.push(extractReworkContent(note.body));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return comments;
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
return [];
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=gitlab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab.js","sourceRoot":"","sources":["../../../../../src/scripts/shared/pull-request/gitlab/gitlab.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,oBAAoB,EACpB,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,KAAa,EACb,OAAe,EACf,WAAmB,EACnB,YAAoB,EACpB,YAAoB,EACpB,KAAa,EACb,WAAmB;IAEnB,MAAM,WAAW,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAEpD,OAAO,eAAe,CACpB,GAAG,OAAO,aAAa,WAAW,iBAAiB,EACnD,EAAE,eAAe,EAAE,KAAK,EAAE,EAC1B;QACE,aAAa,EAAE,YAAY;QAC3B,aAAa,EAAE,YAAY;QAC3B,KAAK;QACL,WAAW;QACX,oBAAoB,EAAE,IAAI;KAC3B,EACD,CAAC,IAAI,EAAE,EAAE;QACP,MAAM,IAAI,GAAG,IAA0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
+
* Shared pull request creation utility.
|
|
3
|
+
*
|
|
4
|
+
* Wraps the common POST + error-handling pattern used by all three
|
|
5
|
+
* git host PR creation functions (GitHub, GitLab, Bitbucket).
|
|
6
|
+
*/
|
|
7
|
+
import type { PrCreationResult } from '../../../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* POST a pull request / merge request and return a typed result.
|
|
10
|
+
*
|
|
11
|
+
* Handles the common try/catch, response parsing, error formatting,
|
|
12
|
+
* and "already exists" detection shared by all git host implementations.
|
|
13
|
+
*
|
|
14
|
+
* @param url - The API endpoint to POST to.
|
|
15
|
+
* @param headers - HTTP headers (including auth).
|
|
16
|
+
* @param body - The request body (JSON-serialised).
|
|
17
|
+
* @param parseSuccess - Extract `{ url, number }` from the success response JSON.
|
|
18
|
+
* @param isAlreadyExists - Optional check for duplicate PR detection.
|
|
19
|
+
* @returns A typed `PrCreationResult`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function postPullRequest(url: string, headers: Record<string, string>, body: Record<string, unknown>, parseSuccess: (json: unknown) => {
|
|
22
|
+
url: string;
|
|
23
|
+
number: number;
|
|
24
|
+
}, isAlreadyExists?: (status: number, text: string) => boolean): Promise<PrCreationResult>;
|
|
25
|
+
/**
|
|
26
|
+
* Build a Basic Auth header value from username and token.
|
|
27
|
+
*
|
|
28
|
+
* Used by Bitbucket Cloud which requires HTTP Basic Auth.
|
|
29
|
+
*/
|
|
30
|
+
export declare function basicAuth(username: string, token: string): string;
|
|
31
|
+
//# sourceMappingURL=post-pr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-pr.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/shared/pull-request/post-pr/post-pr.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAChE,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,GAC1D,OAAO,CAAC,gBAAgB,CAAC,CA0C3B;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjE"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* POST a pull request / merge request and return a typed result.
|
|
3
|
+
*
|
|
4
|
+
* Handles the common try/catch, response parsing, error formatting,
|
|
5
|
+
* and "already exists" detection shared by all git host implementations.
|
|
6
|
+
*
|
|
7
|
+
* @param url - The API endpoint to POST to.
|
|
8
|
+
* @param headers - HTTP headers (including auth).
|
|
9
|
+
* @param body - The request body (JSON-serialised).
|
|
10
|
+
* @param parseSuccess - Extract `{ url, number }` from the success response JSON.
|
|
11
|
+
* @param isAlreadyExists - Optional check for duplicate PR detection.
|
|
12
|
+
* @returns A typed `PrCreationResult`.
|
|
13
|
+
*/
|
|
14
|
+
export async function postPullRequest(url, headers, body, parseSuccess, isAlreadyExists) {
|
|
15
|
+
const controller = new AbortController();
|
|
16
|
+
const timeout = setTimeout(() => controller.abort(), 30_000);
|
|
17
|
+
try {
|
|
18
|
+
const response = await fetch(url, {
|
|
19
|
+
method: 'POST',
|
|
20
|
+
headers: { ...headers, 'Content-Type': 'application/json' },
|
|
21
|
+
body: JSON.stringify(body),
|
|
22
|
+
signal: controller.signal,
|
|
23
|
+
});
|
|
24
|
+
if (!response.ok) {
|
|
25
|
+
const text = await response.text().catch(() => '');
|
|
26
|
+
const alreadyExists = isAlreadyExists?.(response.status, text) ?? false;
|
|
27
|
+
return {
|
|
28
|
+
ok: false,
|
|
29
|
+
error: `HTTP ${response.status}${text ? `: ${text.slice(0, 200)}` : ''}`,
|
|
30
|
+
alreadyExists,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const json = await response.json();
|
|
34
|
+
const parsed = parseSuccess(json);
|
|
35
|
+
if (!parsed.url && !parsed.number) {
|
|
36
|
+
return {
|
|
37
|
+
ok: false,
|
|
38
|
+
error: 'PR created but response missing URL and number',
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return { ok: true, url: parsed.url, number: parsed.number };
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
return {
|
|
45
|
+
ok: false,
|
|
46
|
+
error: err instanceof Error ? err.message : String(err),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
clearTimeout(timeout);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Build a Basic Auth header value from username and token.
|
|
55
|
+
*
|
|
56
|
+
* Used by Bitbucket Cloud which requires HTTP Basic Auth.
|
|
57
|
+
*/
|
|
58
|
+
export function basicAuth(username, token) {
|
|
59
|
+
return `Basic ${Buffer.from(`${username}:${token}`).toString('base64')}`;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=post-pr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-pr.js","sourceRoot":"","sources":["../../../../../src/scripts/shared/pull-request/post-pr/post-pr.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,GAAW,EACX,OAA+B,EAC/B,IAA6B,EAC7B,YAAgE,EAChE,eAA2D;IAE3D,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CA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O,GAAG,EAAE,CAAC;QACb,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;SACxD,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,QAAgB,EAAE,KAAa;IACvD,OAAO,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,IAAI,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { BoardConfig, Ticket } from '../../../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Build the PR/MR body for a ticket.
|
|
10
|
+
*
|
|
11
|
+
* Includes a link back to the board ticket (auto-close for GitHub Issues)
|
|
12
|
+
* and a Clancy attribution footer.
|
|
13
|
+
*
|
|
14
|
+
* @param config - The board configuration.
|
|
15
|
+
* @param ticket - The ticket being implemented.
|
|
16
|
+
* @returns The PR body as a markdown string.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildPrBody(config: BoardConfig, ticket: Ticket): string;
|
|
19
|
+
//# sourceMappingURL=pr-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,WAAW,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE5D;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CA2CvE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the PR/MR body for a ticket.
|
|
3
|
+
*
|
|
4
|
+
* Includes a link back to the board ticket (auto-close for GitHub Issues)
|
|
5
|
+
* and a Clancy attribution footer.
|
|
6
|
+
*
|
|
7
|
+
* @param config - The board configuration.
|
|
8
|
+
* @param ticket - The ticket being implemented.
|
|
9
|
+
* @returns The PR body as a markdown string.
|
|
10
|
+
*/
|
|
11
|
+
export function buildPrBody(config, ticket) {
|
|
12
|
+
const lines = [];
|
|
13
|
+
switch (config.provider) {
|
|
14
|
+
case 'github':
|
|
15
|
+
lines.push(`Closes ${ticket.key}`);
|
|
16
|
+
break;
|
|
17
|
+
case 'jira':
|
|
18
|
+
lines.push(`**Jira:** [${ticket.key}](${config.env.JIRA_BASE_URL}/browse/${ticket.key})`);
|
|
19
|
+
break;
|
|
20
|
+
case 'linear':
|
|
21
|
+
lines.push(`**Linear:** ${ticket.key}`);
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
lines.push('');
|
|
25
|
+
if (ticket.description) {
|
|
26
|
+
lines.push('## Description');
|
|
27
|
+
lines.push('');
|
|
28
|
+
lines.push(ticket.description);
|
|
29
|
+
lines.push('');
|
|
30
|
+
}
|
|
31
|
+
lines.push('---');
|
|
32
|
+
lines.push('*Created by [Clancy](https://github.com/Pushedskydiver/clancy)*');
|
|
33
|
+
lines.push('');
|
|
34
|
+
lines.push('---');
|
|
35
|
+
lines.push('**Rework instructions:** To request changes:');
|
|
36
|
+
lines.push('- **Code comments** — leave inline comments on specific lines. These are always picked up automatically.');
|
|
37
|
+
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.');
|
|
38
|
+
lines.push('');
|
|
39
|
+
lines.push("Example: `Rework: The form validation doesn't handle empty passwords`");
|
|
40
|
+
return lines.join('\n');
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=pr-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-body.js","sourceRoot":"","sources":["../../../../../src/scripts/shared/pull-request/pr-body/pr-body.ts"],"names":[],"mappings":"AAQA;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CAAC,MAAmB,EAAE,MAAc;IAC7D,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,QAAQ,MAAM,CAAC,QAAQ,EAAE,CAAC;QACxB,KAAK,QAAQ;YACX,KAAK,CAAC,IAAI,CAAC,UAAU,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;YACnC,MAAM;QACR,KAAK,MAAM;YACT,KAAK,CAAC,IAAI,CACR,cAAc,MAAM,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,aAAa,WAAW,MAAM,CAAC,GAAG,GAAG,CAC9E,CAAC;YACF,MAAM;QACR,KAAK,QAAQ;YACX,KAAK,CAAC,IAAI,CAAC,eAAe,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;YACxC,MAAM;IACV,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;IAC9E,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;IAC3D,KAAK,CAAC,IAAI,CACR,0GAA0G,CAC3G,CAAC;IACF,KAAK,CAAC,IAAI,CACR,uKAAuK,CACxK,CAAC;IACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CACR,uEAAuE,CACxE,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|