@kud/gh-ink 0.18.0 → 0.19.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/dist/index.d.ts +13 -1
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -172,8 +172,20 @@ type Action = {
|
|
|
172
172
|
subActions?: Action[];
|
|
173
173
|
};
|
|
174
174
|
type JiraTransition = {
|
|
175
|
+
/** What the action menu shows. Yours to word; nothing matches on it. */
|
|
175
176
|
label: string;
|
|
176
|
-
|
|
177
|
+
/**
|
|
178
|
+
* The TRANSITION name, passed verbatim to `jira issue move`. Not the
|
|
179
|
+
* destination status, and the two are routinely different strings — jira-cli
|
|
180
|
+
* matches `t.name.toLowerCase() === wanted`, so a status name here matches no
|
|
181
|
+
* transition, the move silently does nothing, and the row simply does not
|
|
182
|
+
* budge. This field was called `state`, which is what invited exactly that:
|
|
183
|
+
* cockpit had `{ label: "UAT", state: "UAT" }` against an ACC workflow whose
|
|
184
|
+
* transition is named "Ready for QA" and whose status is "In Testing (QA)" —
|
|
185
|
+
* no "UAT" anywhere, and no error either.
|
|
186
|
+
*/
|
|
187
|
+
transition: string;
|
|
188
|
+
/** Offered as a second step when the transition asks for a resolution. */
|
|
177
189
|
resolutions?: string[];
|
|
178
190
|
};
|
|
179
191
|
declare const relativeTime: (iso: string) => string;
|
package/dist/index.js
CHANGED
|
@@ -1309,7 +1309,7 @@ var buildActions = (item, login, showFlash, jiraBase, jiraKeyRe, jiraTransitions
|
|
|
1309
1309
|
run: () => {
|
|
1310
1310
|
},
|
|
1311
1311
|
subActions: jiraTransitions.map(
|
|
1312
|
-
({ label,
|
|
1312
|
+
({ label, transition, resolutions }) => resolutions && resolutions.length > 0 ? {
|
|
1313
1313
|
label,
|
|
1314
1314
|
hint: "",
|
|
1315
1315
|
run: () => {
|
|
@@ -1319,7 +1319,7 @@ var buildActions = (item, login, showFlash, jiraBase, jiraKeyRe, jiraTransitions
|
|
|
1319
1319
|
hint: "",
|
|
1320
1320
|
run: () => {
|
|
1321
1321
|
showFlash(`\u22EF ${label} \xB7 ${resolution}\u2026`);
|
|
1322
|
-
void quietly`jira issue move ${item.ticket} ${
|
|
1322
|
+
void quietly`jira issue move ${item.ticket} ${transition} --resolution ${resolution}`.then(() => {
|
|
1323
1323
|
showFlash(`\u2713 ${label} \xB7 ${resolution}`);
|
|
1324
1324
|
ext?.onActed?.();
|
|
1325
1325
|
}).catch(() => showFlash(`\u2717 Move to ${label} failed`));
|
|
@@ -1330,7 +1330,7 @@ var buildActions = (item, login, showFlash, jiraBase, jiraKeyRe, jiraTransitions
|
|
|
1330
1330
|
hint: "",
|
|
1331
1331
|
run: () => {
|
|
1332
1332
|
showFlash(`\u22EF Moving to ${label}\u2026`);
|
|
1333
|
-
void quietly`jira issue move ${item.ticket} ${
|
|
1333
|
+
void quietly`jira issue move ${item.ticket} ${transition}`.then(() => {
|
|
1334
1334
|
showFlash(`\u2713 Moved to ${label}`);
|
|
1335
1335
|
ext?.onActed?.();
|
|
1336
1336
|
}).catch(() => showFlash(`\u2717 Move to ${label} failed`));
|
|
@@ -2427,7 +2427,7 @@ var BrowseScreen = ({
|
|
|
2427
2427
|
if (input === "t" && activeItem && activeItem.kind === "task" && activeItem.ticket && jiraTransitions && jiraTransitions.length > 0) {
|
|
2428
2428
|
const jiraKey = activeItem.ticket;
|
|
2429
2429
|
const actions = jiraTransitions.map(
|
|
2430
|
-
({ label,
|
|
2430
|
+
({ label, transition, resolutions }) => resolutions && resolutions.length > 0 ? {
|
|
2431
2431
|
label,
|
|
2432
2432
|
hint: "",
|
|
2433
2433
|
run: () => {
|
|
@@ -2438,7 +2438,7 @@ var BrowseScreen = ({
|
|
|
2438
2438
|
run: () => {
|
|
2439
2439
|
menu.close();
|
|
2440
2440
|
showFlash(`\u22EF ${label} \xB7 ${resolution}\u2026`);
|
|
2441
|
-
quietly`jira issue move ${jiraKey} ${
|
|
2441
|
+
quietly`jira issue move ${jiraKey} ${transition} --resolution ${resolution}`.then(() => {
|
|
2442
2442
|
showFlash(`\u2713 ${label} \xB7 ${resolution}`);
|
|
2443
2443
|
onActed?.();
|
|
2444
2444
|
}).catch(() => showFlash(`\u2717 Move to ${label} failed`));
|
|
@@ -2450,7 +2450,7 @@ var BrowseScreen = ({
|
|
|
2450
2450
|
run: () => {
|
|
2451
2451
|
menu.close();
|
|
2452
2452
|
showFlash(`\u22EF Moving to ${label}\u2026`);
|
|
2453
|
-
quietly`jira issue move ${jiraKey} ${
|
|
2453
|
+
quietly`jira issue move ${jiraKey} ${transition}`.then(() => {
|
|
2454
2454
|
showFlash(`\u2713 Moved to ${label}`);
|
|
2455
2455
|
onActed?.();
|
|
2456
2456
|
}).catch(() => showFlash(`\u2717 Move to ${label} failed`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/gh-ink",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Ink components for rendering GitHub PR review comments and health — controlled, presentation-only, built on @kud/ink-ui and fed by @kud/gh.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|