Skip to content

feat(action): Add sane defaults for failOn and commentOn#14

Merged
dcramer merged 1 commit intomainfrom
feat/fail-on-defaults
Jan 29, 2026
Merged

feat(action): Add sane defaults for failOn and commentOn#14
dcramer merged 1 commit intomainfrom
feat/fail-on-defaults

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Jan 29, 2026

Summary

  • Add default fail-on: 'high' so checks fail on critical/high severity findings out of the box
  • Add new comment-on input with default 'medium' to control annotation visibility
  • Wire up commentOn input in action code with proper fallback from trigger config → action input
  • Update repo's warden.toml with explicit defaults section for documentation

Test plan

  • Verify action builds successfully
  • Test with a PR that has high severity findings → check should fail
  • Test with a PR that has only medium/low findings → check should pass (neutral)
  • Verify annotations appear for medium+ severity findings

🤖 Generated with Claude Code

GitHub checks now fail by default when critical or high severity findings
are detected. Annotations are shown for medium+ severity findings.

- Add `fail-on` input default to 'high' in action.yml
- Add `comment-on` input with default 'medium' in action.yml
- Wire up commentOn input in action code with proper fallback
- Update warden.toml with explicit defaults section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
warden Ready Ready Preview, Comment Jan 29, 2026 9:27pm

Request Review

@sentry-warden
Copy link
Contributor

sentry-warden bot commented Jan 29, 2026

security-review

security-review: No issues found

No findings to report.

@dcramer dcramer merged commit 323ee86 into main Jan 29, 2026
9 checks passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

);
}

const validSeverities = ['critical', 'high', 'medium', 'low', 'info'] as const;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated severity validation list instead of reusing existing type

Low Severity

The validSeverities array duplicates the severity values already defined in SeveritySchema from src/types/index.ts. The CLI (src/cli/args.ts) correctly imports and uses SeveritySchema for validation, but this action code manually redefines the same list. This creates a maintenance burden where changes to valid severity levels need to be updated in multiple places. The existing SeveritySchema.options could be used instead.

Fix in Cursor Fix in Web

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