fix: skip gate for draft PRs (v2.2.0)#44
Merged
Conversation
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.
|
✅ Permission Protocol: Approved |
Collaborator
Author
\uD83D\uDEAB Deploy BlockedThis change targets production. A human must explicitly approve and sign before this can merge. ⏳ Analyzing risk... \uD83D\uDD12 Permission Protocol · Pricing |
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.
Summary
The action had no draft check, so users who trigger their workflow on all
pull_requestevents (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 isDraftbefore the verify/create flow. If the PR is a draft:approved=true,decision=DRAFT_SKIPPEDUses
GH_TOKENwhich 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.0→v2.2.0