ticketlens 0.38.6 → 0.38.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ticketlens",
3
- "version": "0.38.6",
3
+ "version": "0.38.7",
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": {
@@ -107,14 +107,16 @@ export async function runComplianceCheck({
107
107
  const missing = analysis.results
108
108
  .filter(r => r.status === 'NOT_FOUND')
109
109
  .map(r => r.requirement);
110
+ const noCriteria = requirements.length === 0;
110
111
 
111
112
  if (isPro) {
112
113
  const gitEmail = execFn('git', ['config', 'user.email'], { encoding: 'utf8' }).stdout?.trim() ?? 'unknown';
114
+ const commitSha = execFn('git', ['rev-parse', 'HEAD'], { encoding: 'utf8' }).stdout?.trim() ?? 'unknown';
113
115
  appendLedgerFn(
114
- { ticketKey, commitSha: 'HEAD', author: gitEmail || 'unknown', coverage: coveragePercent, missing },
116
+ { ticketKey, commitSha: commitSha || 'unknown', author: gitEmail || 'unknown', coverage: coveragePercent, missing, noCriteria },
115
117
  { configDir, isPro }
116
118
  );
117
119
  }
118
120
 
119
- return { report, results: analysis.results, coveragePercent, noCriteria: requirements.length === 0 };
121
+ return { report, results: analysis.results, coveragePercent, noCriteria };
120
122
  }
@@ -65,10 +65,10 @@ export function exportLedger(format, { configDir = DEFAULT_CONFIG_DIR, fsModule
65
65
  const records = readLedger({ configDir, fsModule });
66
66
 
67
67
  if (format === 'csv') {
68
- const header = 'ts,ticketKey,commitSha,author,coverage,missing';
68
+ const header = 'ts,ticketKey,commitSha,author,coverage,missing,noCriteria';
69
69
  const rows = records.map(r => {
70
70
  const missing = Array.isArray(r.missing) ? r.missing.join('|') : (r.missing ?? '');
71
- return [r.ts, r.ticketKey, r.commitSha, r.author, r.coverage, missing]
71
+ return [r.ts, r.ticketKey, r.commitSha, r.author, r.coverage, missing, r.noCriteria]
72
72
  .map(v => `"${String(v ?? '').replace(/"/g, '""')}"`)
73
73
  .join(',');
74
74
  });
@@ -55,7 +55,7 @@ export async function runCollisions(args = [], opts = {}) {
55
55
  const { collisions = [], message } = await res.json();
56
56
 
57
57
  if (message && collisions.length === 0) {
58
- print(message + '\n');
58
+ print(jsonFlag ? formatCollisions([], { json: true }) : message + '\n');
59
59
  return { ok: true };
60
60
  }
61
61