ticketlens 0.42.2 → 0.42.3

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
@@ -1121,6 +1121,7 @@ npm test
1121
1121
  See [ROADMAP.md](ROADMAP.md) for the full plan.
1122
1122
 
1123
1123
  Recently shipped:
1124
+ - **`review`/`compliance` fixes** — branch diff now uses merge-base semantics, no longer picks up unrelated unmerged-main files; AC parser now recognizes Jira wiki `Requirements`/`How to test` headers, not just literal "Acceptance Criteria"
1124
1125
  - **`ticketlens update --priority`** — a bad priority name now tells you the project's real, current valid options instead of a bare tracker error
1125
1126
  - **`ticketlens assign --to="name or email"`** — assign a ticket to another developer, not just yourself. Jira (Cloud + Server/DC); searches real assignable users first, lists matches, executes only on one confirmed match. Pro tier
1126
1127
  - **Console: Recall "select all N matching" bulk delete** — Gmail-style banner deletes every note matching your search/filters across all pages, not just the current one
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ticketlens",
3
- "version": "0.42.2",
3
+ "version": "0.42.3",
4
4
  "description": "Jira CLI for developers — fetch ticket context, triage your queue, and stop tab-switching. Zero dependencies, all local.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -800,7 +800,7 @@ export async function run(args, envOrOpts = process.env, fetcher = globalThis.fe
800
800
  const logResult = execFn('git', ['log', '--oneline', `${baseBranch}..HEAD`], { encoding: 'utf8', cwd, timeout: 10_000 });
801
801
  const commitMessages = logResult.status === 0 ? (logResult.stdout ?? '') : '';
802
802
 
803
- const diffResult = execFn('git', ['diff', `${baseBranch}..HEAD`], { encoding: 'utf8', cwd, timeout: 30_000 });
803
+ const diffResult = execFn('git', ['diff', `${baseBranch}...HEAD`], { encoding: 'utf8', cwd, timeout: 30_000 });
804
804
  const diff = diffResult.status === 0 ? (diffResult.stdout || null) : null;
805
805
 
806
806
  const allText = [headBranch ?? '', commitMessages].join('\n');
@@ -3,7 +3,7 @@
3
3
  * Centralised here to avoid triplicating the regex and warning logic.
4
4
  */
5
5
 
6
- export const DEFAULT_API_BASE = 'https://api.ticketlens.app';
6
+ export const DEFAULT_API_BASE = 'http://api.ticketlens.test';
7
7
  export const DEFAULT_SITE_BASE = 'https://ticketlens.app';
8
8
 
9
9
  // Matches localhost, 127.0.0.1, and any hostname ending in .test or .local,
@@ -43,7 +43,7 @@ export function scanCurrentBranch({ cwd = process.cwd(), execFn = spawnSync, fsC
43
43
 
44
44
  let files = [];
45
45
  if (base) {
46
- const diffOut = run(execFn, ['diff', '--name-only', `${base}..HEAD`], cwd);
46
+ const diffOut = run(execFn, ['diff', '--name-only', `${base}...HEAD`], cwd);
47
47
  if (diffOut) {
48
48
  files = diffOut.trim().split('\n').filter(Boolean).slice(0, MAX_FILES);
49
49
  }
@@ -9,8 +9,17 @@
9
9
  const RE_GWT = /^\s*(given|when|then)\s+(.+)/i;
10
10
  const RE_MUST_ITEM = /^\s*[-*•]\s+((?:must|should|shall|ensure|verify)\b.+|.+(?:must|should|shall|ensure|verify).+)/i;
11
11
  const RE_NUM_MUST = /^\s*\d+[.)]\s+((?:must|should|shall|ensure|verify)\b.+|.+(?:must|should|shall|ensure|verify).+)/i;
12
- const RE_AC_HEADER = /^\s*(?:#+\s*|h[1-6]\.\s*)?acceptance criteria\s*:?\s*$/i;
13
- const RE_HEADING = /^\s*(?:#+|h[1-6]\.)\s+/i;
12
+ // Matches "Acceptance Criteria" plus the two real-world Jira Server/DC section headers
13
+ // (backlog #43) that carry the same content without that literal phrase: "Requirements"
14
+ // and "How to test". A nested subheading (e.g. "h3. Validation range") does NOT match
15
+ // this and still exits the section — known limitation, filed as a follow-up.
16
+ const RE_AC_HEADER = /^\s*(?:#+\s*|h[1-6]\.\s*)?(?:acceptance criteria|requirements|how to test)\s*:?\s*$/i;
17
+ // Wiki-only (h1.-h6.) for section-exit detection — backlog #43: a leading markdown "#"
18
+ // is indistinguishable from Jira Server/DC's "#" numbered-list marker (e.g. "# Run the
19
+ // test suite."), so including it here closed real AC/how-to-test sections on their own
20
+ // first list item. Entry detection (RE_AC_HEADER/RE_NON_AC_HEADER) is unaffected — those
21
+ // still accept a markdown "#" prefix on the header line itself.
22
+ const RE_HEADING = /^\s*h[1-6]\.\s+/i;
14
23
  const RE_BULLET = /^\s*[-*•]\s+(.+)/;
15
24
  const RE_NUM_ITEM = /^\s*\d+[.)]\s+(.+)/;
16
25
  const RE_NUM_MARKER = /^\s*(\d+)[.)]/;
@@ -101,7 +110,7 @@ export function extractRequirements(text) {
101
110
 
102
111
  if (RE_AC_HEADER.test(line)) { inAcSection = true; continue; }
103
112
 
104
- // Exit on any explicit heading (markdown ## or wiki h2.) that is not the AC header
113
+ // Exit on any explicit heading (wiki h1.-h6. only, see RE_HEADING) that is not the AC header
105
114
  if (inAcSection && RE_HEADING.test(line) && !RE_AC_HEADER.test(line)) {
106
115
  inAcSection = false;
107
116
  }