@aiready/cli 0.12.23 → 0.13.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.
@@ -128,6 +128,10 @@ describe('Scan CLI Action', () => {
128
128
  expect(consoleSpy).toHaveBeenCalledWith(
129
129
  expect.stringContaining('PR BLOCKED')
130
130
  );
131
+ // Verify annotations are emitted
132
+ expect(consoleSpy).toHaveBeenCalledWith(
133
+ expect.stringContaining('Emitting GitHub Action annotations')
134
+ );
131
135
  exitSpy.mockRestore();
132
136
  });
133
137
 
@@ -23,6 +23,7 @@ import {
23
23
  IssueType,
24
24
  ToolName,
25
25
  ToolRegistry,
26
+ emitIssuesAsAnnotations,
26
27
  } from '@aiready/core';
27
28
  import { analyzeUnified, scoreUnified, type ScoringResult } from '../index';
28
29
  import {
@@ -402,12 +403,21 @@ export async function scanAction(directory: string, options: ScanOptions) {
402
403
  let shouldFail = false;
403
404
  let failReason = '';
404
405
 
406
+ // Emit annotations for all issues found
407
+ const report = mapToUnifiedReport(results, scoringResult);
408
+ if (report.results && report.results.length > 0) {
409
+ console.log(
410
+ chalk.cyan(
411
+ `\nšŸ“ Emitting GitHub Action annotations for ${report.results.length} issues...`
412
+ )
413
+ );
414
+ emitIssuesAsAnnotations(report.results);
415
+ }
416
+
405
417
  if (threshold && scoringResult.overall < threshold) {
406
418
  shouldFail = true;
407
419
  failReason = `Score ${scoringResult.overall} < threshold ${threshold}`;
408
420
  }
409
-
410
- const report = mapToUnifiedReport(results, scoringResult);
411
421
  if (failOnLevel !== 'none') {
412
422
  if (failOnLevel === 'critical' && report.summary.criticalIssues > 0) {
413
423
  shouldFail = true;