Skip to content

fix(action): Handle missing warden.toml gracefully#235

Merged
gricha merged 2 commits intomainfrom
fix/graceful-missing-config
Mar 5, 2026
Merged

fix(action): Handle missing warden.toml gracefully#235
gricha merged 2 commits intomainfrom
fix/graceful-missing-config

Conversation

@gricha
Copy link
Member

@gricha gricha commented Mar 5, 2026

When the GitHub Action runs on a repo without warden.toml, it crashes with exit code 1 and reports an "Unexpected error" to Sentry. This is a common scenario for repos that add the action before creating the config, or org-wide workflows where not every repo has opted in.

Catches ConfigLoadError at both workflow entry points (PR and schedule) and exits cleanly with a ::warning:: message instead of failing the action. Follows the existing "no triggers matched" early-return pattern already used in both workflows.

Other ConfigLoadError cases (parse errors, validation errors, legacy format) still throw and fail the action as before.

Agent transcript: https://claudescope.sentry.dev/share/lpezniVmz0GcymEEO8POKy_EdMOXeUZ5sRZuCd5WgWw

When the GitHub Action runs on a repo without warden.toml, it crashed
with exit code 1 and reported an unexpected error to Sentry. This is
wrong for repos that add the action before creating the config, or use
it in org-wide workflows where not every repo has opted in.

Catch ConfigLoadError at both workflow entry points (PR and schedule)
and exit cleanly with a ::warning:: instead of failing the action.
Follows the existing "no triggers matched" early-return pattern.

Co-Authored-By: Claude <noreply@anthropic.com>

Agent transcript: https://claudescope.sentry.dev/share/pkGX6KFvxN7CtyR5kCsEHS6Ni_092DHzeMsXxRoMDwU
@gricha gricha marked this pull request as ready for review March 5, 2026 04:15
Add writeFindingsOutput call to the no-config early-exit paths in both
PR and schedule workflows. The action.yml documents findings-file as
always written, and downstream steps may depend on it existing.

Co-Authored-By: Claude <noreply@anthropic.com>

Agent transcript: https://claudescope.sentry.dev/share/wvFbjiyscoGJvmGndy9Lfljn9QhrhwJVmVZMUN8UVa8
@gricha gricha merged commit 8f79da3 into main Mar 5, 2026
13 checks passed
@gricha gricha deleted the fix/graceful-missing-config branch March 5, 2026 05:04
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.

1 participant