Skip to content

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

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

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

Conversation

@maksimgm

@maksimgm maksimgm commented Nov 25, 2026 •

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, and a check that is turned off (e.g. detect-license-changes: false) logs a warning if it is in fail-on

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, the always-on reports with a threshold of -1 and a threshold of 0 with nothing added 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.

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