Skip to content

fix: skip gate for draft PRs (v2.2.0)#44

Merged
rodchalski merged 3 commits into
mainfrom
pp-activation-hardening-20260502212104
May 14, 2026
Merged

fix: skip gate for draft PRs (v2.2.0)#44
rodchalski merged 3 commits into
mainfrom
pp-activation-hardening-20260502212104

Conversation

@rodchalski
Copy link
Copy Markdown
Collaborator

Summary

The action had no draft check, so users who trigger their workflow on all pull_request events (the common default) would hit the PP gate on draft PRs — even after the app-side webhook fix in permission-protocol/app#531.

Fix

Added an early check using gh pr view --json isDraft before the verify/create flow. If the PR is a draft:

  • Exits with approved=true, decision=DRAFT_SKIPPED
  • No deploy request created
  • No blocking of the workflow

Uses GH_TOKEN which is already in the step environment — no new secrets needed.

When the PR is marked ready for review the workflow re-runs and the gate proceeds normally.

Version bump

v2.1.0v2.2.0

Charles (Cron Worker) added 2 commits May 2, 2026 15:22
Add early draft check via 'gh pr view --json isDraft' before the
verify/create flow. Exits with approved=true and decision=DRAFT_SKIPPED
so the step doesn't block the workflow. Gate runs normally when the
PR is marked ready for review.

No new secrets needed — GH_TOKEN is already in the environment.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

Permission Protocol: Approved
View receipt →

@rodchalski
Copy link
Copy Markdown
Collaborator Author

rodchalski commented May 14, 2026

\uD83D\uDEAB Deploy Blocked

This change targets production. A human must explicitly approve and sign before this can merge.

⏳ Analyzing risk...

View in Permission Protocol

\uD83D\uDD12 Permission Protocol · Pricing

@rodchalski rodchalski merged commit 10a5e5f into main May 14, 2026
1 of 2 checks passed
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