@bussolabs/closeyourit-cli 0.0.11 → 0.0.12
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 +2 -0
- package/dist/commands/tickets/approve.d.ts +12 -0
- package/dist/commands/tickets/approve.js +24 -0
- package/dist/commands/tickets/reject.d.ts +13 -0
- package/dist/commands/tickets/reject.js +29 -0
- package/oclif.manifest.json +1125 -1023
- package/opencli.json +65 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -59,6 +59,8 @@ organization are stored locally.
|
|
|
59
59
|
| `tickets list --project <id\|key> [--page]` | List tickets. |
|
|
60
60
|
| `tickets show <id> --project <id\|key>` | Show one ticket. |
|
|
61
61
|
| `tickets create --project <id\|key> --title <t> [--kind] [--step-*] [--description] [--status-id] [--priority-id]` | Create a ticket. |
|
|
62
|
+
| `tickets reject <id> --project <id\|key> --reason <text>` | Reject the review: back to work, the reason becomes a comment. |
|
|
63
|
+
| `tickets approve <id> --project <id\|key>` | Approve the review: move to the first done status. |
|
|
62
64
|
| `metrics list --project <id\|key> [--kind] [--page]` | List metric groups. |
|
|
63
65
|
| `metrics show <id> --project <id\|key>` | Show one metric group. |
|
|
64
66
|
| `logs list [--project <id\|key>] [--level] [--trace-id] [--environment] [--page]` | List structured log entries. Cross-app: omit `--project` for the full visible stream. |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TicketsApprove 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
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 TicketsApprove extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Approve a ticket review: move it to the first done status';
|
|
8
|
+
static examples = ['<%= config.bin %> tickets approve <ticket-id> --project acme-api'];
|
|
9
|
+
static args = {
|
|
10
|
+
id: core_1.Args.string({ description: 'Ticket id or code (e.g. DRFL-3)', required: true }),
|
|
11
|
+
};
|
|
12
|
+
static flags = { ...base_1.projectFlag };
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(TicketsApprove);
|
|
15
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
16
|
+
const res = await this.api.post(`/cli/v1/projects/${projectId}/tickets/${args.id}/review/approval`);
|
|
17
|
+
if (!this.jsonEnabled()) {
|
|
18
|
+
this.log(`Ticket ${args.id} review approved:`);
|
|
19
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
20
|
+
}
|
|
21
|
+
return res;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = TicketsApprove;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base';
|
|
2
|
+
export default class TicketsReject 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
|
+
reason: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 TicketsReject extends base_1.BaseCommand {
|
|
7
|
+
static description = 'Reject a ticket review: send it back to work with a reason';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> tickets reject <ticket-id> --project acme-api --reason "Edge case not covered"',
|
|
10
|
+
];
|
|
11
|
+
static args = {
|
|
12
|
+
id: core_1.Args.string({ description: 'Ticket id or code (e.g. DRFL-3)', required: true }),
|
|
13
|
+
};
|
|
14
|
+
static flags = {
|
|
15
|
+
...base_1.projectFlag,
|
|
16
|
+
reason: core_1.Flags.string({ description: 'Why the review is rejected (posted as a comment)', required: true }),
|
|
17
|
+
};
|
|
18
|
+
async run() {
|
|
19
|
+
const { args, flags } = await this.parse(TicketsReject);
|
|
20
|
+
const projectId = await this.resolveProjectId(flags.project);
|
|
21
|
+
const res = await this.api.post(`/cli/v1/projects/${projectId}/tickets/${args.id}/review/rejection`, { reason: flags.reason });
|
|
22
|
+
if (!this.jsonEnabled()) {
|
|
23
|
+
this.log(`Ticket ${args.id} review rejected, sent back to work:`);
|
|
24
|
+
this.log((0, output_1.renderRecord)(res.data ?? {}));
|
|
25
|
+
}
|
|
26
|
+
return res;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = TicketsReject;
|