@bussolabs/closeyourit-cli 0.19.0 → 0.21.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/README.md +39 -5
- package/dist/base.d.ts +22 -0
- package/dist/base.js +46 -0
- package/dist/commands/alerts/notifications/read-all.js +3 -0
- package/dist/commands/alerts/preferences/show.js +2 -0
- package/dist/commands/ideas/convert.d.ts +2 -2
- package/dist/commands/ideas/convert.js +25 -8
- package/dist/commands/kb/book/add-page.d.ts +18 -0
- package/dist/commands/kb/book/add-page.js +55 -0
- package/dist/commands/kb/book/list.d.ts +12 -0
- package/dist/commands/kb/book/list.js +33 -0
- package/dist/commands/kb/book/show.d.ts +9 -0
- package/dist/commands/kb/book/show.js +22 -0
- package/dist/commands/kb/create.js +29 -6
- package/dist/commands/kb/publish.d.ts +15 -0
- package/dist/commands/kb/publish.js +106 -0
- package/dist/commands/kb/update.js +26 -5
- package/dist/commands/logout.js +3 -0
- package/dist/commands/org/show.js +2 -0
- package/dist/commands/personal/import.js +2 -2
- package/dist/commands/personal/run.js +1 -1
- package/dist/commands/run.js +1 -1
- package/dist/commands/secrets/import.js +2 -2
- package/dist/commands/seo/ignore.d.ts +12 -0
- package/dist/commands/seo/ignore.js +27 -0
- package/dist/commands/seo/list.d.ts +13 -0
- package/dist/commands/seo/list.js +52 -0
- package/dist/commands/seo/pages.d.ts +11 -0
- package/dist/commands/seo/pages.js +44 -0
- package/dist/commands/seo/promote.d.ts +9 -0
- package/dist/commands/seo/promote.js +22 -0
- package/dist/commands/seo/reopen.d.ts +9 -0
- package/dist/commands/seo/reopen.js +21 -0
- package/dist/commands/seo/rescan.d.ts +9 -0
- package/dist/commands/seo/rescan.js +21 -0
- package/dist/commands/seo/show.d.ts +9 -0
- package/dist/commands/seo/show.js +35 -0
- package/dist/commands/seo-sites/create.d.ts +14 -0
- package/dist/commands/seo-sites/create.js +43 -0
- package/dist/commands/seo-sites/delete.d.ts +9 -0
- package/dist/commands/seo-sites/delete.js +21 -0
- package/dist/commands/seo-sites/list.d.ts +10 -0
- package/dist/commands/seo-sites/list.js +38 -0
- package/dist/commands/seo-sites/update.d.ts +17 -0
- package/dist/commands/seo-sites/update.js +45 -0
- package/dist/commands/tickets/comment.d.ts +14 -3
- package/dist/commands/tickets/comment.js +29 -1
- package/dist/commands/tickets/create.d.ts +6 -6
- package/dist/commands/tickets/create.js +21 -2
- package/dist/commands/tickets/report-show.d.ts +20 -0
- package/dist/commands/tickets/report-show.js +38 -0
- package/dist/commands/tickets/report-versions.d.ts +19 -0
- package/dist/commands/tickets/report-versions.js +40 -0
- package/dist/commands/tickets/report.d.ts +24 -0
- package/dist/commands/tickets/report.js +69 -0
- package/dist/commands/tickets/status.d.ts +1 -1
- package/dist/commands/tickets/status.js +14 -4
- package/dist/commands/tickets/update.d.ts +25 -6
- package/dist/commands/tickets/update.js +144 -9
- package/dist/commands/whoami.js +3 -0
- package/dist/errors/error-codes.d.ts +12 -0
- package/dist/errors/error-codes.js +19 -0
- package/dist/errors/input-error.d.ts +16 -0
- package/dist/errors/input-error.js +42 -0
- package/dist/lib/alert-events.js +1 -0
- package/dist/lib/knowledge.d.ts +24 -0
- package/dist/lib/knowledge.js +68 -0
- package/dist/lib/limits.d.ts +59 -0
- package/dist/lib/limits.js +92 -0
- package/dist/lib/stdin.d.ts +1 -2
- package/dist/lib/stdin.js +1 -2
- package/dist/lib/subprocess.d.ts +1 -1
- package/dist/lib/subprocess.js +1 -1
- package/dist/lib/ticket-body.d.ts +22 -6
- package/dist/lib/ticket-body.js +71 -9
- package/dist/lib/ticket-lookup.d.ts +53 -0
- package/dist/lib/ticket-lookup.js +78 -0
- package/dist/lib/ticket-report.d.ts +7 -0
- package/dist/lib/ticket-report.js +14 -0
- package/oclif.manifest.json +3931 -2876
- package/opencli.json +860 -113
- package/package.json +4 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
class SeoSitesDelete extends base_1.BaseCommand {
|
|
6
|
+
static description = 'Stop watching a site and remove its pages and findings';
|
|
7
|
+
static examples = ['<%= config.bin %> seo-sites delete <site-id>'];
|
|
8
|
+
static args = {
|
|
9
|
+
id: core_1.Args.string({ description: 'Site id', required: true }),
|
|
10
|
+
};
|
|
11
|
+
async run() {
|
|
12
|
+
const { args } = await this.parse(SeoSitesDelete);
|
|
13
|
+
const res = await this.api.delete(`/cli/v1/seo_sites/${args.id}`);
|
|
14
|
+
if (!this.jsonEnabled()) {
|
|
15
|
+
// Pages and findings go with it: to keep the history, pause the site instead (`update --disable`).
|
|
16
|
+
this.log(`Site ${args.id} removed, with its pages and findings.`);
|
|
17
|
+
}
|
|
18
|
+
return res;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = SeoSitesDelete;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class SeoSitesList extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<unknown>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const output_1 = require("../../lib/output");
|
|
6
|
+
class SeoSitesList extends base_1.BaseCommand {
|
|
7
|
+
static description = 'List the sites under SEO check';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> seo-sites list',
|
|
10
|
+
'<%= config.bin %> seo-sites list --project acme-site --json',
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
project: core_1.Flags.string({ char: 'p', description: 'Filter by project id (UUID) or key' }),
|
|
14
|
+
...base_1.pageFlag,
|
|
15
|
+
};
|
|
16
|
+
async run() {
|
|
17
|
+
const { flags } = await this.parse(SeoSitesList);
|
|
18
|
+
const query = new URLSearchParams({ page: String(flags.page) });
|
|
19
|
+
if (flags.project)
|
|
20
|
+
query.set('project_id', await this.resolveProjectId(flags.project));
|
|
21
|
+
const res = await this.api.get(`/cli/v1/seo_sites?${query.toString()}`);
|
|
22
|
+
const sites = res.data ?? [];
|
|
23
|
+
if (!this.jsonEnabled()) {
|
|
24
|
+
this.log((0, output_1.renderTable)(['ID', 'PROJECT', 'ENV', 'SITE', 'EVERY', 'OPEN', 'LAST CHECK'], sites.map((site) => [
|
|
25
|
+
String(site.id ?? ''),
|
|
26
|
+
String(site.project?.key ?? ''),
|
|
27
|
+
String(site.environment?.code ?? ''),
|
|
28
|
+
String(site.base_url ?? ''),
|
|
29
|
+
String(site.frequency ?? ''),
|
|
30
|
+
String(site.open_issues_count ?? 0),
|
|
31
|
+
// A failed run must never look like a successful one: the reason wins over the date.
|
|
32
|
+
site.last_error ? (0, output_1.statusCell)(`failed: ${site.last_error}`) : String(site.last_audited_at ?? 'never'),
|
|
33
|
+
])));
|
|
34
|
+
}
|
|
35
|
+
return res;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.default = SeoSitesList;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class SeoSitesUpdate extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
url: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
frequency: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'max-pages': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
sitemap: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
enable: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
disable: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<unknown>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const output_1 = require("../../lib/output");
|
|
6
|
+
class SeoSitesUpdate extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Change how a site is checked (project and environment are its identity: they never change)';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> seo-sites update <site-id> --frequency weekly',
|
|
10
|
+
'<%= config.bin %> seo-sites update <site-id> --max-pages 200 --disable',
|
|
11
|
+
];
|
|
12
|
+
static args = {
|
|
13
|
+
id: core_1.Args.string({ description: 'Site id', required: true }),
|
|
14
|
+
};
|
|
15
|
+
static flags = {
|
|
16
|
+
url: core_1.Flags.string({ description: 'Public address the visit starts from' }),
|
|
17
|
+
frequency: core_1.Flags.string({ description: 'How often to check it: daily or weekly', options: ['daily', 'weekly'] }),
|
|
18
|
+
'max-pages': core_1.Flags.integer({ description: 'How many pages to visit at most each run' }),
|
|
19
|
+
sitemap: core_1.Flags.boolean({ description: 'Read the sitemap', allowNo: true }),
|
|
20
|
+
enable: core_1.Flags.boolean({ description: 'Resume the checks', exclusive: ['disable'] }),
|
|
21
|
+
disable: core_1.Flags.boolean({ description: 'Pause the checks (the site and its findings stay)', exclusive: ['enable'] }),
|
|
22
|
+
};
|
|
23
|
+
async run() {
|
|
24
|
+
const { args, flags } = await this.parse(SeoSitesUpdate);
|
|
25
|
+
const body = {};
|
|
26
|
+
if (flags.url !== undefined)
|
|
27
|
+
body.base_url = flags.url;
|
|
28
|
+
if (flags.frequency !== undefined)
|
|
29
|
+
body.frequency = flags.frequency;
|
|
30
|
+
if (flags['max-pages'] !== undefined)
|
|
31
|
+
body.max_pages = flags['max-pages'];
|
|
32
|
+
if (flags.sitemap !== undefined)
|
|
33
|
+
body.follow_sitemap = flags.sitemap;
|
|
34
|
+
if (flags.enable)
|
|
35
|
+
body.enabled = true;
|
|
36
|
+
if (flags.disable)
|
|
37
|
+
body.enabled = false;
|
|
38
|
+
const res = await this.api.put(`/cli/v1/seo_sites/${args.id}`, body);
|
|
39
|
+
if (!this.jsonEnabled()) {
|
|
40
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
41
|
+
}
|
|
42
|
+
return res;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.default = SeoSitesUpdate;
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
import { type Interfaces } from '@oclif/core';
|
|
1
2
|
import { BaseCommand } from '../../base';
|
|
2
3
|
export default class TicketsComment extends BaseCommand {
|
|
3
4
|
static args: {
|
|
4
|
-
id:
|
|
5
|
+
id: Interfaces.Arg<string, Record<string, unknown>>;
|
|
5
6
|
};
|
|
6
7
|
static description: string;
|
|
7
8
|
static examples: string[];
|
|
8
9
|
static flags: {
|
|
9
|
-
body:
|
|
10
|
-
project:
|
|
10
|
+
body: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
11
|
+
project: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
|
|
11
12
|
};
|
|
13
|
+
/** Ticket e progetto come li ha scritti l'utente: il suggerimento su R422 li ripete tali e quali. */
|
|
14
|
+
private target?;
|
|
12
15
|
run(): Promise<unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* Il commento troppo lungo va scritto altrove, e il messaggio del server dice solo «use the work
|
|
18
|
+
* report»: prima di CYCL-31 quel campo dal terminale non esisteva e l'unica uscita era aprire il
|
|
19
|
+
* sito. Ora esiste, quindi al messaggio si accoda il comando pronto da eseguire, con il ticket e
|
|
20
|
+
* il progetto già dentro. Codice e testo del server restano intatti — anche in `--json`, dove il
|
|
21
|
+
* suggerimento viaggia in coda al `message` e il `code` resta `R422-COMMENT-002`.
|
|
22
|
+
*/
|
|
23
|
+
protected catch(error: Interfaces.CommandError): Promise<unknown>;
|
|
13
24
|
}
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const base_1 = require("../../base");
|
|
5
|
+
const api_1 = require("../../lib/api");
|
|
6
|
+
const limits_1 = require("../../lib/limits");
|
|
5
7
|
const output_1 = require("../../lib/output");
|
|
8
|
+
// Rifiuto del server per un commento oltre il limite: il messaggio rimanda «al work report». Il
|
|
9
|
+
// codice resta quello del backend, propagato tale e quale (vedi errors/error-codes.ts) — quello che
|
|
10
|
+
// si aggiunge è il comando che quel campo lo scrive davvero (CYCL-31).
|
|
11
|
+
const COMMENT_TOO_LONG = 'R422-COMMENT-002';
|
|
6
12
|
class TicketsComment extends base_1.BaseCommand {
|
|
7
13
|
static args = {
|
|
8
14
|
id: core_1.Args.string({ description: 'Ticket id', required: true }),
|
|
@@ -13,10 +19,18 @@ class TicketsComment extends base_1.BaseCommand {
|
|
|
13
19
|
];
|
|
14
20
|
static flags = {
|
|
15
21
|
...base_1.projectFlag,
|
|
16
|
-
|
|
22
|
+
// Il tetto è dichiarato qui e la misura resta al server: il suo rifiuto porta il comando pronto
|
|
23
|
+
// per scrivere altrove il testo che non ci sta (vedi `catch`), che un controllo locale toglierebbe.
|
|
24
|
+
body: core_1.Flags.string({
|
|
25
|
+
description: `Comment body (max ${limits_1.LENGTH_LIMITS.comment} characters — longer text goes in the work report)`,
|
|
26
|
+
required: true,
|
|
27
|
+
}),
|
|
17
28
|
};
|
|
29
|
+
/** Ticket e progetto come li ha scritti l'utente: il suggerimento su R422 li ripete tali e quali. */
|
|
30
|
+
target;
|
|
18
31
|
async run() {
|
|
19
32
|
const { args, flags } = await this.parse(TicketsComment);
|
|
33
|
+
this.target = { id: args.id, project: flags.project };
|
|
20
34
|
const projectId = await this.resolveProjectId(flags.project);
|
|
21
35
|
const res = await this.api.post(`/cli/v1/projects/${projectId}/tickets/${args.id}/comments`, { body: flags.body });
|
|
22
36
|
if (!this.jsonEnabled()) {
|
|
@@ -25,5 +39,19 @@ class TicketsComment extends base_1.BaseCommand {
|
|
|
25
39
|
}
|
|
26
40
|
return res;
|
|
27
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Il commento troppo lungo va scritto altrove, e il messaggio del server dice solo «use the work
|
|
44
|
+
* report»: prima di CYCL-31 quel campo dal terminale non esisteva e l'unica uscita era aprire il
|
|
45
|
+
* sito. Ora esiste, quindi al messaggio si accoda il comando pronto da eseguire, con il ticket e
|
|
46
|
+
* il progetto già dentro. Codice e testo del server restano intatti — anche in `--json`, dove il
|
|
47
|
+
* suggerimento viaggia in coda al `message` e il `code` resta `R422-COMMENT-002`.
|
|
48
|
+
*/
|
|
49
|
+
async catch(error) {
|
|
50
|
+
if (error instanceof api_1.ApiRequestError && error.code === COMMENT_TOO_LONG && this.target) {
|
|
51
|
+
const hint = `Write it with: ${this.config.bin} tickets report ${this.target.id} --project ${this.target.project} --body-file <file>`;
|
|
52
|
+
return super.catch(new api_1.ApiRequestError(error.status, error.code, `${error.message} ${hint}`, error.details));
|
|
53
|
+
}
|
|
54
|
+
return super.catch(error);
|
|
55
|
+
}
|
|
28
56
|
}
|
|
29
57
|
exports.default = TicketsComment;
|
|
@@ -3,6 +3,12 @@ export default class TicketsCreate extends BaseCommand {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
+
status: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
priority: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
'assignee-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
'milestone-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
'parent-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'platform-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
12
|
description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
13
|
'technical-analysis': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
14
|
scenarios: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -13,12 +19,6 @@ export default class TicketsCreate extends BaseCommand {
|
|
|
13
19
|
condition: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
20
|
weight: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
21
|
'due-at': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
-
'status-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
-
'priority-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
-
'assignee-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
-
'milestone-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
-
'parent-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
21
|
-
'platform-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
22
|
title: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
23
23
|
kind: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
24
24
|
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -2,26 +2,45 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const base_1 = require("../../base");
|
|
5
|
+
const limits_1 = require("../../lib/limits");
|
|
5
6
|
const output_1 = require("../../lib/output");
|
|
6
7
|
const ticket_body_1 = require("../../lib/ticket-body");
|
|
8
|
+
const ticket_lookup_1 = require("../../lib/ticket-lookup");
|
|
7
9
|
class TicketsCreate extends base_1.BaseCommand {
|
|
8
|
-
static description = 'Create a ticket';
|
|
10
|
+
static description = 'Create a ticket (status defaults to open, priority to medium; both take a code or a label)';
|
|
9
11
|
static examples = [
|
|
10
12
|
'<%= config.bin %> tickets create --project acme-api --title "Checkout fails"',
|
|
11
13
|
'<%= config.bin %> tickets create -p acme-api --title "Login bug" --kind bug --step-given "logged out" --step-when "I submit" --step-then "it 500s"',
|
|
12
14
|
'<%= config.bin %> tickets create -p acme-api --title "Checkout" --scenarios \'[{"title":"Happy","step_given":"logged in","step_when":"I pay","step_then":"order created"}]\' --condition "confirmation email is sent"',
|
|
15
|
+
'<%= config.bin %> tickets create -p acme-api --title "Payment retry" --status in_progress --priority High',
|
|
13
16
|
];
|
|
14
17
|
static flags = {
|
|
15
18
|
...base_1.projectFlag,
|
|
16
|
-
title: core_1.Flags.string({ description:
|
|
19
|
+
title: core_1.Flags.string({ description: `Ticket title (max ${limits_1.LENGTH_LIMITS.title} characters)`, required: true }),
|
|
17
20
|
kind: core_1.Flags.string({ description: 'Ticket kind (bug, story, task, epic)', default: 'bug', options: ['bug', 'story', 'task', 'epic'] }),
|
|
18
21
|
...ticket_body_1.ticketBodyFlags,
|
|
22
|
+
// Su un ticket che nasce, omettere stato e priorità non li lascia com'erano: applica i predefiniti.
|
|
23
|
+
...ticket_lookup_1.newTicketLookupFlags,
|
|
19
24
|
};
|
|
20
25
|
async run() {
|
|
21
26
|
const { flags } = await this.parse(TicketsCreate);
|
|
27
|
+
// Un ticket nuovo non ha niente da salvaguardare: il tetto vale pieno, e i campi troppo lunghi
|
|
28
|
+
// si leggono tutti in questo unico rifiuto invece che uno per tentativo (CYCL-32).
|
|
29
|
+
const tooLong = (0, limits_1.tooLongMessage)((0, ticket_body_1.ticketLengthChecks)(flags));
|
|
30
|
+
if (tooLong)
|
|
31
|
+
this.error(tooLong, { exit: 2 });
|
|
22
32
|
const projectId = await this.resolveProjectId(flags.project);
|
|
23
33
|
const body = { title: flags.title, kind: flags.kind };
|
|
24
34
|
(0, ticket_body_1.applyTicketBody)(body, flags);
|
|
35
|
+
// Stato e priorità il server li pretende ("Status must exist and Priority must exist") mentre
|
|
36
|
+
// l'aiuto li dava per opzionali: chi non li indica prende i predefiniti, chi li indica li scrive
|
|
37
|
+
// come li legge (`open`, `In Progress`) invece di andare a cercarne l'UUID (CYCL-34).
|
|
38
|
+
const [statusId, priorityId] = await Promise.all([
|
|
39
|
+
this.resolveTicketLookupId(ticket_lookup_1.TICKET_STATUS, flags.status),
|
|
40
|
+
this.resolveTicketLookupId(ticket_lookup_1.TICKET_PRIORITY, flags.priority),
|
|
41
|
+
]);
|
|
42
|
+
body.status_id = statusId;
|
|
43
|
+
body.priority_id = priorityId;
|
|
25
44
|
const res = await this.api.post(`/cli/v1/projects/${projectId}/tickets`, body);
|
|
26
45
|
if (!this.jsonEnabled()) {
|
|
27
46
|
this.log('Ticket created:');
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
/**
|
|
3
|
+
* Legge il resoconto di lavorazione (CYCL-31): senza `--version` la stesura corrente, con `--version N`
|
|
4
|
+
* quella versione della cronologia — il numero è unico per ticket, quindi non serve l'id.
|
|
5
|
+
*
|
|
6
|
+
* Un ticket senza resoconto risponde `R404-REPORT-001` e il comando esce non-zero: uno script che
|
|
7
|
+
* pretende un resoconto se ne accorge, invece di leggere un output vuoto come "c'è ed è vuoto".
|
|
8
|
+
*/
|
|
9
|
+
export default class TicketsReportShow extends BaseCommand {
|
|
10
|
+
static args: {
|
|
11
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
12
|
+
};
|
|
13
|
+
static description: string;
|
|
14
|
+
static examples: string[];
|
|
15
|
+
static flags: {
|
|
16
|
+
version: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<unknown>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const ticket_report_1 = require("../../lib/ticket-report");
|
|
6
|
+
/**
|
|
7
|
+
* Legge il resoconto di lavorazione (CYCL-31): senza `--version` la stesura corrente, con `--version N`
|
|
8
|
+
* quella versione della cronologia — il numero è unico per ticket, quindi non serve l'id.
|
|
9
|
+
*
|
|
10
|
+
* Un ticket senza resoconto risponde `R404-REPORT-001` e il comando esce non-zero: uno script che
|
|
11
|
+
* pretende un resoconto se ne accorge, invece di leggere un output vuoto come "c'è ed è vuoto".
|
|
12
|
+
*/
|
|
13
|
+
class TicketsReportShow extends base_1.BaseCommand {
|
|
14
|
+
static args = {
|
|
15
|
+
id: core_1.Args.string({ description: 'Ticket id or code (e.g. DRFL-3)', required: true }),
|
|
16
|
+
};
|
|
17
|
+
static description = 'Show the current work report of a ticket, or a past version with --version';
|
|
18
|
+
static examples = [
|
|
19
|
+
'<%= config.bin %> tickets report-show <ticket-id> --project acme-api',
|
|
20
|
+
'<%= config.bin %> tickets report-show DRFL-3 -p acme-api --version 2',
|
|
21
|
+
];
|
|
22
|
+
static flags = {
|
|
23
|
+
...base_1.projectFlag,
|
|
24
|
+
version: core_1.Flags.integer({ description: 'Version number to read instead of the current one' }),
|
|
25
|
+
};
|
|
26
|
+
async run() {
|
|
27
|
+
const { args, flags } = await this.parse(TicketsReportShow);
|
|
28
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
29
|
+
const base = `/cli/v1/projects/${encodeURIComponent(projectId)}/tickets/${encodeURIComponent(args.id)}/report`;
|
|
30
|
+
const path = flags.version === undefined ? base : `${base}/versions/${encodeURIComponent(String(flags.version))}`;
|
|
31
|
+
const res = await this.api.get(path);
|
|
32
|
+
if (!this.jsonEnabled()) {
|
|
33
|
+
this.log((0, ticket_report_1.renderReport)(res.data ?? {}));
|
|
34
|
+
}
|
|
35
|
+
return res;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.default = TicketsReportShow;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
/**
|
|
3
|
+
* Cronologia del resoconto di lavorazione (CYCL-31), dalla più recente alla più vecchia. La tabella
|
|
4
|
+
* porta i metadati e la LUNGHEZZA di ogni stesura, non il testo: i corpi sono lunghi migliaia di
|
|
5
|
+
* caratteri e incolonnarli renderebbe illeggibile la lista. Il testo di una versione si legge con
|
|
6
|
+
* `tickets report-show --version N`.
|
|
7
|
+
*/
|
|
8
|
+
export default class TicketsReportVersions extends BaseCommand {
|
|
9
|
+
static args: {
|
|
10
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
11
|
+
};
|
|
12
|
+
static description: string;
|
|
13
|
+
static examples: string[];
|
|
14
|
+
static flags: {
|
|
15
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<unknown>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const limits_1 = require("../../lib/limits");
|
|
6
|
+
const output_1 = require("../../lib/output");
|
|
7
|
+
/**
|
|
8
|
+
* Cronologia del resoconto di lavorazione (CYCL-31), dalla più recente alla più vecchia. La tabella
|
|
9
|
+
* porta i metadati e la LUNGHEZZA di ogni stesura, non il testo: i corpi sono lunghi migliaia di
|
|
10
|
+
* caratteri e incolonnarli renderebbe illeggibile la lista. Il testo di una versione si legge con
|
|
11
|
+
* `tickets report-show --version N`.
|
|
12
|
+
*/
|
|
13
|
+
class TicketsReportVersions extends base_1.BaseCommand {
|
|
14
|
+
static args = {
|
|
15
|
+
id: core_1.Args.string({ description: 'Ticket id or code (e.g. DRFL-3)', required: true }),
|
|
16
|
+
};
|
|
17
|
+
static description = 'List the versions of the work report of a ticket (newest first)';
|
|
18
|
+
static examples = [
|
|
19
|
+
'<%= config.bin %> tickets report-versions <ticket-id> --project acme-api',
|
|
20
|
+
'<%= config.bin %> tickets report-versions DRFL-3 -p acme-api --page 2 --json',
|
|
21
|
+
];
|
|
22
|
+
static flags = { ...base_1.projectFlag, ...base_1.pageFlag };
|
|
23
|
+
async run() {
|
|
24
|
+
const { args, flags } = await this.parse(TicketsReportVersions);
|
|
25
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
26
|
+
const res = await this.api.get(`/cli/v1/projects/${encodeURIComponent(projectId)}/tickets/${encodeURIComponent(args.id)}/report/versions?page=${flags.page}`);
|
|
27
|
+
const versions = res.data ?? [];
|
|
28
|
+
if (!this.jsonEnabled()) {
|
|
29
|
+
this.log((0, output_1.renderTable)(['VERSION', 'AUTHOR', 'SOURCE', 'CHARS', 'CREATED_AT'], versions.map((version) => [
|
|
30
|
+
String(version.version ?? ''),
|
|
31
|
+
String(version.author ?? '-'),
|
|
32
|
+
String(version.source ?? '-'),
|
|
33
|
+
String((0, limits_1.charCount)(version.body)),
|
|
34
|
+
String(version.created_at ?? ''),
|
|
35
|
+
])));
|
|
36
|
+
}
|
|
37
|
+
return res;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = TicketsReportVersions;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
/**
|
|
3
|
+
* Resoconto di lavorazione di un ticket (CYCL-31). È il campo che il server indica quando rifiuta un
|
|
4
|
+
* commento troppo lungo, e fino a qui esisteva solo nel form web: chi chiudeva una lavorazione dal
|
|
5
|
+
* terminale doveva aprire il sito o rinunciare a scrivere il resoconto.
|
|
6
|
+
*
|
|
7
|
+
* Ogni scrittura AGGIUNGE una versione, non sovrascrive la precedente: correggere un resoconto
|
|
8
|
+
* significa scriverne uno nuovo, e la cronologia si legge con `tickets report-versions`. Ripassare
|
|
9
|
+
* lo stesso identico testo non crea una versione in più — è il server a riconoscerlo, quindi un
|
|
10
|
+
* comando ripetuto (un retry di uno script) non sporca la cronologia.
|
|
11
|
+
*/
|
|
12
|
+
export default class TicketsReport extends BaseCommand {
|
|
13
|
+
static args: {
|
|
14
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
15
|
+
};
|
|
16
|
+
static description: string;
|
|
17
|
+
static examples: string[];
|
|
18
|
+
static flags: {
|
|
19
|
+
body: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
+
'body-file': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
21
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
|
+
};
|
|
23
|
+
run(): Promise<unknown>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const promises_1 = require("node:fs/promises");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const base_1 = require("../../base");
|
|
6
|
+
const limits_1 = require("../../lib/limits");
|
|
7
|
+
const ticket_report_1 = require("../../lib/ticket-report");
|
|
8
|
+
/**
|
|
9
|
+
* Resoconto di lavorazione di un ticket (CYCL-31). È il campo che il server indica quando rifiuta un
|
|
10
|
+
* commento troppo lungo, e fino a qui esisteva solo nel form web: chi chiudeva una lavorazione dal
|
|
11
|
+
* terminale doveva aprire il sito o rinunciare a scrivere il resoconto.
|
|
12
|
+
*
|
|
13
|
+
* Ogni scrittura AGGIUNGE una versione, non sovrascrive la precedente: correggere un resoconto
|
|
14
|
+
* significa scriverne uno nuovo, e la cronologia si legge con `tickets report-versions`. Ripassare
|
|
15
|
+
* lo stesso identico testo non crea una versione in più — è il server a riconoscerlo, quindi un
|
|
16
|
+
* comando ripetuto (un retry di uno script) non sporca la cronologia.
|
|
17
|
+
*/
|
|
18
|
+
class TicketsReport extends base_1.BaseCommand {
|
|
19
|
+
static args = {
|
|
20
|
+
id: core_1.Args.string({ description: 'Ticket id or code (e.g. DRFL-3)', required: true }),
|
|
21
|
+
};
|
|
22
|
+
static description = 'Write the work report of a ticket — the long text a comment cannot hold. Each write adds a version, it never overwrites the previous one';
|
|
23
|
+
static examples = [
|
|
24
|
+
'<%= config.bin %> tickets report <ticket-id> --project acme-api --body "Cosa ho fatto, come si verifica"',
|
|
25
|
+
'<%= config.bin %> tickets report DRFL-3 -p acme-api --body-file ./report.md',
|
|
26
|
+
];
|
|
27
|
+
static flags = {
|
|
28
|
+
...base_1.projectFlag,
|
|
29
|
+
body: core_1.Flags.string({ description: `Report body (markdown, max ${limits_1.LENGTH_LIMITS.report} characters)` }),
|
|
30
|
+
'body-file': core_1.Flags.string({
|
|
31
|
+
description: `Read the report body (max ${limits_1.LENGTH_LIMITS.report} characters) from a local file`,
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
async run() {
|
|
35
|
+
const { args, flags } = await this.parse(TicketsReport);
|
|
36
|
+
// Una versione è immutabile: se i due valori divergono, sceglierne uno a caso lascia il
|
|
37
|
+
// resoconto sbagliato per sempre. Meglio fermarsi prima di scrivere.
|
|
38
|
+
if (flags.body !== undefined && flags['body-file'] !== undefined) {
|
|
39
|
+
this.error('Pass the report body with --body or --body-file, not both.', { exit: 2 });
|
|
40
|
+
}
|
|
41
|
+
let body = flags.body;
|
|
42
|
+
let bodyFlag = '--body';
|
|
43
|
+
if (body === undefined && flags['body-file'] !== undefined) {
|
|
44
|
+
bodyFlag = '--body-file';
|
|
45
|
+
try {
|
|
46
|
+
body = await (0, promises_1.readFile)(flags['body-file'], 'utf8');
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
this.error(`File not found or unreadable: ${flags['body-file']}`, { exit: 2 });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (body === undefined) {
|
|
53
|
+
this.error('Provide the report body via --body or --body-file.', { exit: 2 });
|
|
54
|
+
}
|
|
55
|
+
// Ogni scrittura è una versione nuova, quindi il tetto vale sempre pieno: niente da salvaguardare
|
|
56
|
+
// e nessun motivo di spedire un testo che il server rifiuterebbe comunque (CYCL-32).
|
|
57
|
+
const tooLong = (0, limits_1.tooLongMessage)([{ flag: bodyFlag, value: body, max: limits_1.LENGTH_LIMITS.report, orthography: true }]);
|
|
58
|
+
if (tooLong)
|
|
59
|
+
this.error(tooLong, { exit: 2 });
|
|
60
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
61
|
+
const res = await this.api.post(`/cli/v1/projects/${encodeURIComponent(projectId)}/tickets/${encodeURIComponent(args.id)}/report`, { body });
|
|
62
|
+
if (!this.jsonEnabled()) {
|
|
63
|
+
this.log('Work report saved:');
|
|
64
|
+
this.log((0, ticket_report_1.renderReport)(res.data ?? {}));
|
|
65
|
+
}
|
|
66
|
+
return res;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.default = TicketsReport;
|
|
@@ -6,7 +6,7 @@ export default class TicketsStatus extends BaseCommand {
|
|
|
6
6
|
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
static flags: {
|
|
9
|
-
|
|
9
|
+
status: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
10
|
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
};
|
|
12
12
|
run(): Promise<unknown>;
|
|
@@ -3,20 +3,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const base_1 = require("../../base");
|
|
5
5
|
const output_1 = require("../../lib/output");
|
|
6
|
+
const ticket_lookup_1 = require("../../lib/ticket-lookup");
|
|
6
7
|
class TicketsStatus extends base_1.BaseCommand {
|
|
7
|
-
static description = 'Change a ticket status';
|
|
8
|
-
static examples = [
|
|
8
|
+
static description = 'Change a ticket status (by code, label or id)';
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> tickets status <ticket-id> --project acme-api --status in_review',
|
|
11
|
+
'<%= config.bin %> tickets status <ticket-id> --project acme-api --status <status-id>',
|
|
12
|
+
];
|
|
9
13
|
static args = {
|
|
10
14
|
id: core_1.Args.string({ description: 'Ticket id', required: true }),
|
|
11
15
|
};
|
|
12
16
|
static flags = {
|
|
13
17
|
...base_1.projectFlag,
|
|
14
|
-
|
|
18
|
+
// Lo stato si scrive come lo si legge: `--status-id` resta come alias per gli script (CYCL-34).
|
|
19
|
+
status: core_1.Flags.string({
|
|
20
|
+
aliases: ['status-id'],
|
|
21
|
+
description: 'Target status code, label or id (e.g. in_review, "In Review")',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
15
24
|
};
|
|
16
25
|
async run() {
|
|
17
26
|
const { args, flags } = await this.parse(TicketsStatus);
|
|
18
27
|
const projectId = await this.resolveProjectId(flags.project);
|
|
19
|
-
const
|
|
28
|
+
const statusId = await this.resolveTicketLookupId(ticket_lookup_1.TICKET_STATUS, flags.status);
|
|
29
|
+
const res = await this.api.put(`/cli/v1/projects/${projectId}/tickets/${args.id}/status`, { status_id: statusId });
|
|
20
30
|
if (!this.jsonEnabled()) {
|
|
21
31
|
this.log(`Ticket ${args.id} status updated:`);
|
|
22
32
|
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
@@ -6,6 +6,14 @@ export default class TicketsUpdate extends BaseCommand {
|
|
|
6
6
|
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
static flags: {
|
|
9
|
+
replace: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
clear: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'assignee-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'milestone-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'parent-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'platform-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
status: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
priority: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
17
|
description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
18
|
'technical-analysis': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
19
|
scenarios: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -16,15 +24,26 @@ export default class TicketsUpdate extends BaseCommand {
|
|
|
16
24
|
condition: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
25
|
weight: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
26
|
'due-at': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
-
'status-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
-
'priority-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
21
|
-
'assignee-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
|
-
'milestone-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
23
|
-
'parent-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
24
|
-
'platform-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
25
27
|
title: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
26
28
|
kind: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
27
29
|
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
28
30
|
};
|
|
29
31
|
run(): Promise<unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* Lo stato attuale del ticket, nella forma che la PUT si aspetta, per i soli campi che chi ha
|
|
34
|
+
* scritto il comando non ha già deciso. I campi vuoti restano fuori dal corpo: ometterli o
|
|
35
|
+
* mandarli a null è la stessa cosa, e il corpo resta leggibile.
|
|
36
|
+
*/
|
|
37
|
+
private currentState;
|
|
38
|
+
/** Rifiuta `--clear x` insieme a `--x`: impostare e svuotare lo stesso campo è una richiesta ambigua. */
|
|
39
|
+
private refuseClearConflicts;
|
|
40
|
+
/** Id della voce di lookup che corrisponde all'etichetta mostrata dalla GET del ticket. */
|
|
41
|
+
private lookupId;
|
|
42
|
+
/**
|
|
43
|
+
* Una lookup non trovata o ambigua ferma il comando: proseguire manderebbe una PUT senza quel
|
|
44
|
+
* campo, cioè lo cancellerebbe in silenzio — il difetto che questo comando esiste per evitare.
|
|
45
|
+
*/
|
|
46
|
+
private matchId;
|
|
47
|
+
/** Ogni pagina di un endpoint di lookup: la voce cercata può stare oltre la prima. */
|
|
48
|
+
private lookupRows;
|
|
30
49
|
}
|