ticketlens 0.2.1 → 0.3.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
CHANGED
|
@@ -164,6 +164,27 @@ Bot comments (Jira Automation, Jenkins, GitHub Actions) are automatically ignore
|
|
|
164
164
|
|
|
165
165
|
---
|
|
166
166
|
|
|
167
|
+
### Collisions
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
ticketlens collisions # Show branches that overlap with teammates [Team]
|
|
171
|
+
ticketlens collisions --json # Machine-readable output
|
|
172
|
+
ticketlens collisions --plain # Plain text, no ANSI colour
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Requires a Team license and at least one teammate in your group. Compares your current git branch's changed files against your teammates' recent branches (within 7 days). Reports each overlap as a collision: your branch, their branch, the shared files, and linked ticket keys.
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
[1] feat/auth-refactor ↔ Jane Dev (feat/login-redesign)
|
|
179
|
+
Your tickets: PROJ-101
|
|
180
|
+
Their tickets: PROJ-88
|
|
181
|
+
Shared files: src/auth/LoginController.php, src/auth/guards.php
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Branches are captured automatically when you run `ticketlens triage --push`. No extra step required.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
167
188
|
### Review
|
|
168
189
|
|
|
169
190
|
```bash
|
|
@@ -417,6 +438,11 @@ ticketlens triage --profile=acme --stale=3 --static # Combine flags
|
|
|
417
438
|
ticketlens triage --plain > my-tickets.md
|
|
418
439
|
ticketlens triage --plain | llm "Which ticket is most urgent and why?"
|
|
419
440
|
|
|
441
|
+
# ── Collisions ────────────────────────────────────────────────────────────────
|
|
442
|
+
ticketlens collisions # Show branch collisions with teammates [Team]
|
|
443
|
+
ticketlens collisions --json # Machine-readable JSON output
|
|
444
|
+
ticketlens collisions --plain # Plain text, no ANSI colour
|
|
445
|
+
|
|
420
446
|
# ── PR Review ─────────────────────────────────────────────────────────────────
|
|
421
447
|
ticketlens review # Assemble PR review context from current branch
|
|
422
448
|
ticketlens review --branch=main # Compare against main (auto-detected by default)
|
package/bin/ticketlens.mjs
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
printProfilesHelp, printScheduleHelp,
|
|
25
25
|
printInitHelp, printSwitchHelp, printConfigHelp,
|
|
26
26
|
printReviewHelp, printStandupHelp, printUpdateSkillHelp,
|
|
27
|
+
printCollisionsHelp,
|
|
27
28
|
} from '../skills/jtb/scripts/lib/help.mjs';
|
|
28
29
|
import { createStyler } from '../skills/jtb/scripts/lib/ansi.mjs';
|
|
29
30
|
import { readCliToken, saveCliToken, deleteCliToken } from '../skills/jtb/scripts/lib/cli-auth.mjs';
|
|
@@ -53,6 +54,7 @@ switch (command) {
|
|
|
53
54
|
break;
|
|
54
55
|
|
|
55
56
|
case 'collisions': {
|
|
57
|
+
if (cmdArgs.includes('--help') || cmdArgs.includes('-h')) { printCollisionsHelp(); break; }
|
|
56
58
|
const { runCollisions } = await import('../skills/jtb/scripts/lib/run-collisions.mjs');
|
|
57
59
|
runCollisions(cmdArgs).catch(err => {
|
|
58
60
|
process.stderr.write(`Error: ${err.message}\n`);
|
package/package.json
CHANGED
package/skills/jtb/SKILL.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- jtb-skill-version: 0.
|
|
1
|
+
<!-- jtb-skill-version: 0.3.1 -->
|
|
2
2
|
---
|
|
3
3
|
name: jtb
|
|
4
4
|
description: Fetch a Jira ticket's full context (description, comments, linked issues, code references) and assemble a structured TicketBrief for implementation planning. Use when user types /jtb, mentions a Jira ticket key, or wants to plan work from a Jira ticket.
|
|
@@ -27,6 +27,10 @@ Fetches a Jira ticket and produces a structured brief with code references, then
|
|
|
27
27
|
/jtb triage --stale=3 # custom aging threshold (days)
|
|
28
28
|
/jtb triage --status=CR,QA # only check specific statuses
|
|
29
29
|
/jtb triage --profile=acme # explicit profile override
|
|
30
|
+
/jtb triage --push # push snapshot + git branches to Console (Team)
|
|
31
|
+
/jtb triage --share # generate 24h share URL (Team)
|
|
32
|
+
/jtb collisions # show branch collisions with teammates (Team)
|
|
33
|
+
/jtb collisions --json # machine-readable output
|
|
30
34
|
```
|
|
31
35
|
|
|
32
36
|
## Prerequisites
|
|
@@ -63,6 +67,23 @@ Where `$EXTRA_ARGS` are any flags passed (e.g. `--stale=3 --status=QA --profile=
|
|
|
63
67
|
|
|
64
68
|
---
|
|
65
69
|
|
|
70
|
+
### Collisions subcommand
|
|
71
|
+
|
|
72
|
+
If the first argument is `collisions`:
|
|
73
|
+
|
|
74
|
+
Run:
|
|
75
|
+
```bash
|
|
76
|
+
node ~/.agents/skills/jtb/scripts/lib/run-collisions.mjs $EXTRA_ARGS
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Where `$EXTRA_ARGS` are any flags passed (e.g. `--json`, `--plain`).
|
|
80
|
+
|
|
81
|
+
Requires a Team license and at least one teammate in the same group. Compares your current branch's changed files against teammates' recent branches. Outputs a collision report or an empty-state message.
|
|
82
|
+
|
|
83
|
+
Display the script's stdout directly. No plan mode. Stop here.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
66
87
|
### Fetch ticket workflow (default)
|
|
67
88
|
|
|
68
89
|
### Step 1: Validate environment
|
|
@@ -106,6 +106,10 @@ export function parseCommand(args) {
|
|
|
106
106
|
return { command: 'update-skill', args: args.slice(1) };
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
if (first === 'collisions') {
|
|
110
|
+
return { command: 'collisions', args: args.slice(1) };
|
|
111
|
+
}
|
|
112
|
+
|
|
109
113
|
// Anything that looks like a ticket key or any non-flag arg → fetch
|
|
110
114
|
return { command: 'fetch', args };
|
|
111
115
|
}
|
|
@@ -38,6 +38,7 @@ export function printHelp({ stream = process.stdout } = {}) {
|
|
|
38
38
|
` ${s.brand('ticketlens')} ${s.dim('<TICKET-KEY>')} ${s.dim('[options]')} Fetch a ticket brief`,
|
|
39
39
|
` ${s.brand('ticketlens')} get ${s.dim('<TICKET-KEY>')} Same as above ${s.dim('(explicit alias)')}`,
|
|
40
40
|
` ${s.brand('ticketlens')} triage ${s.dim('[options]')} Scan your assigned tickets`,
|
|
41
|
+
` ${s.brand('ticketlens')} collisions ${s.dim('[--json]')} Show branch collisions with teammates ${s.dim('[Team]')}`,
|
|
41
42
|
` ${s.brand('ticketlens')} review ${s.dim('[--branch=BRANCH]')} Code-review context brief from current branch`,
|
|
42
43
|
` ${s.brand('ticketlens')} standup ${s.dim('[--since=N]')} Standup summary from git log ${s.dim('(last 24h by default)')}`,
|
|
43
44
|
` ${s.brand('ticketlens')} compliance ${s.dim('<TICKET-KEY>')} Check requirements coverage ${s.dim('[Pro/Free 3/mo]')}`,
|
|
@@ -643,6 +644,37 @@ export function printUpdateSkillHelp({ stream = process.stdout } = {}) {
|
|
|
643
644
|
stream.write(lines.join('\n') + '\n');
|
|
644
645
|
}
|
|
645
646
|
|
|
647
|
+
export function printCollisionsHelp({ stream = process.stdout } = {}) {
|
|
648
|
+
const s = createStyler({ isTTY: stream.isTTY });
|
|
649
|
+
const lines = [
|
|
650
|
+
'',
|
|
651
|
+
` ${s.bold(s.brand('ticketlens'))} ${s.bold('collisions')} ${s.dim('[--json] [--plain]')}`,
|
|
652
|
+
'',
|
|
653
|
+
` Show branches where your changed files overlap with a teammate's.`,
|
|
654
|
+
` Reads the most recent snapshot pushed by you and each teammate (within 7 days).`,
|
|
655
|
+
` Requires a ${s.bold('Team')} license and at least one teammate in your group.`,
|
|
656
|
+
'',
|
|
657
|
+
` ${s.bold('OPTIONS')}`,
|
|
658
|
+
'',
|
|
659
|
+
` ${s.brand('--json')} Output raw JSON array of collision objects`,
|
|
660
|
+
` ${s.brand('--plain')} Plain text output ${s.dim('(no ANSI colour)')}`,
|
|
661
|
+
` ${s.brand('-h')}, ${s.brand('--help')} Show this help`,
|
|
662
|
+
'',
|
|
663
|
+
` ${s.bold('EXAMPLES')}`,
|
|
664
|
+
'',
|
|
665
|
+
` ${s.dim('$')} ticketlens collisions`,
|
|
666
|
+
` ${s.dim('$')} ticketlens collisions --json`,
|
|
667
|
+
` ${s.dim('$')} ticketlens collisions --plain`,
|
|
668
|
+
'',
|
|
669
|
+
` ${s.bold('NOTES')}`,
|
|
670
|
+
'',
|
|
671
|
+
` Branch data is captured automatically when you run ${s.brand('ticketlens triage --push')}.`,
|
|
672
|
+
` Snapshots older than 7 days are ignored.`,
|
|
673
|
+
'',
|
|
674
|
+
];
|
|
675
|
+
stream.write(lines.join('\n') + '\n');
|
|
676
|
+
}
|
|
677
|
+
|
|
646
678
|
export function printStandupHelp({ stream = process.stdout } = {}) {
|
|
647
679
|
const s = createStyler({ isTTY: stream.isTTY });
|
|
648
680
|
const lines = [
|
|
@@ -12,10 +12,15 @@ function apiBase() {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// Derive console queue URL from API base:
|
|
15
|
-
// http://ticketlens.test
|
|
15
|
+
// http://api.ticketlens.test → http://ticketlens.test/console/queue
|
|
16
16
|
// https://api.ticketlens.com → https://app.ticketlens.com/console/queue
|
|
17
|
-
function queueUrl(base) {
|
|
18
|
-
|
|
17
|
+
export function queueUrl(base) {
|
|
18
|
+
const noApi = base.replace(/^(https?:\/\/)api\./, '$1');
|
|
19
|
+
// Production: ticketlens.com → app.ticketlens.com
|
|
20
|
+
const console = /ticketlens\.com/.test(noApi)
|
|
21
|
+
? noApi.replace('://', '://app.')
|
|
22
|
+
: noApi;
|
|
23
|
+
return console + '/console/queue';
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
function buildTicketPayload(scored, rawMap, baseUrl) {
|