Skip to content

feat: add fail-on input to fail the action on warnings - #205

Closed
maksimgm wants to merge 1 commit into
e18e:mainfrom
maksimgm:feat/fail-on
Closed

maksimgm wants to merge 1 commit into
e18e:mainfrom
maksimgm:feat/fail-on

Conversation

@maksimgm

Copy link
Copy Markdown
Contributor

closes #168

adds a fail-on input that takes a comma list of checks (dependency-count, dependency-size, duplicates, provenance, license, install-scripts, bundle-size, replacements). if any of them warn, the action fails after the comment or artifact is written, so the report still shows up on the pr. unknown names fail straight away with the list of valid ones

to make that work the scanFor* checks return a {check, message, breached} result instead of pushing into messages. the reports themselves are unchanged (snapshots only gained the wrapper). size decreases and the always-on reports with a threshold of -1 are breached: false, so they never fail it

per your comment on the issue, the artifact recipes now upload the artifact and run the comment workflow when the analyze run fails too

tested the built action in artifact mode on a scratch repo: no fail-on passes, fail-on: dependency-count, replacements exits 1 with the artifact written, fail-on: license with no license warning passes

@github-actions

Copy link
Copy Markdown

e18e dependency analysis

No dependency warnings found.

checks now return a structured result (check name, message and whether
it breached) instead of pushing strings, so the action can fail on a
chosen set of checks after the comment or artifact is written.

closes e18e#168
@maksimgm maksimgm closed this Nov 25, 2026
@maksimgm
maksimgm deleted the feat/fail-on branch November 25, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature request: block PR merge when specific thresholds are exceeded

1 participant