Enhancement: add a `junit` input to the GitHub Action

Đang mở
#715 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
74/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, typescript
Lĩnh vực
ci-cd, cli

Hướng nghiên cứu

Start with action.yml and the action implementation, then read the baseline path validation and summary-out help probe; the issue names src/reporting/commands/scan.ts as the existing --junit entry point. Check the test/action-*.ts contract tests. Done when the optional input adds --junit only when set, rejects unsafe or conflicting paths, handles older CLI versions with a notice, and leaves default runs unchanged.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement good first issue
  • Difficulty: small
  • Area: GitHub Action
Problem

vg scan already has --junit <file> (src/reporting/commands/scan.ts, around line 406). The composite action in action.yml maps max-score, fail-on-epss, baseline, and max-worsening to flags, but has no first-class junit input. Callers must stuff --junit … into args, which is easier to get wrong and is not documented next to the other gates.

Expected behaviour

Add an optional junit input (repo-relative output path). When it is set, pass --junit <path> to scan, after the same kind of path check used for baseline (inside the repository, not absolute, not ..). Do not default it (empty means no JUnit file). output / --out and junit must remain different files; if they resolve to the same path, fail the step with the same message the CLI already uses. Probe scan --help for --junit the way summary-out is probed, so an older image-tag gets a notice instead of a hard failure on an unknown flag.

Acceptance
  • action.yml documents the input and that it maps to --junit.
  • A unit/contract test in the test/action-*.ts style asserts the flag is added only when the input is set, is omitted when empty, and is rejected when it equals output.
  • Default runs (no junit input) are unchanged.

Ngôn ngữ chính
TypeScript
Star
4
Fork
3
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
76

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của vibgrate/cli

Tất cả issue của vibgrate/cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.