Skip to content

Trigger warden when PR moved to ready for review - #230

Draft
geoffg-sentry wants to merge 1 commit into
mainfrom
geoffg-sentry/warden-ready-for-review
Draft

geoffg-sentry wants to merge 1 commit into
mainfrom
geoffg-sentry/warden-ready-for-review

Conversation

@geoffg-sentry

Copy link
Copy Markdown
Contributor

Problem we have today is that warden cannot trigger when a PR is moved from draft to ready_for_review because our warden usage uses rulesets. Rulesets can't be used to track that state change.

This should mean we catch the state change and this new workflow should not trigger when a PR is cut directly as ready since there's no state change.

Problem we have today is that warden cannot trigger when a PR is moved from draft to ready_for_review because our warden usage uses rulesets. Rulesets can't be used to track that state change.

This should mean we catch the state change and this new workflow should not trigger when a PR is cut directly as ready since there's no state change.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 928684c. Configure here.

jobs:
warden:
if: github.event.pull_request.head.repo.full_name == github.repository
uses: getsentry/.github/.github/workflows/warden.yml@main

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Called workflow is not reusable

High Severity

The warden job calls warden.yml via uses, which GitHub only accepts for reusable workflows. warden.yml has no workflow_call trigger, so the run fails as soon as a PR is marked ready for review and Warden never starts.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 928684c. Configure here.

name: Warden - PR Ready for Review
on:
pull_request:
types: [ready_for_review]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Skill triggers omit ready_for_review

High Severity

This workflow runs on ready_for_review, but the org security-review skill in warden.toml only triggers on opened, synchronize, and reopened. Warden matches GitHub Actions runs on event and action, so that skill is skipped and converting a draft PR to ready still produces no review.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 928684c. Configure here.

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