fix(action): Handle missing warden.toml gracefully#235
Merged
Conversation
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ConfigLoadErrorat 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
ConfigLoadErrorcases (parse errors, validation errors, legacy format) still throw and fail the action as before.Agent transcript: https://claudescope.sentry.dev/share/lpezniVmz0GcymEEO8POKy_EdMOXeUZ5sRZuCd5WgWw