grantbirki/pr-status

A dependency-free runtime action that checks pull request status on GitHub.com

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jun 16, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: grantbirki/pr-status@90636f5a04ca4a039bfae198f9bf74996fa636df # v3.0.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
github_tokenThe GitHub.com token used to read pull request state and, when requested, reconcile labelsyes${{ github.token }}
modeExactly `status` for the existing evaluation behavior or `branch-deploy` for exact branch-deploy-status label reconciliationnostatus
workflowThe exact, case-sensitive current job/check name to exclude so this action does not evaluate itselfno${{ github.job }}
pr_numberA positive integer identifying the pull request to evaluate; branch-deploy mode resolves supported events when omittedno""
checksExactly `required` or `all`, selecting which CI checks to evaluateyesall
evaluationsA case-sensitive comma-separated list containing approved, ci_passing, mergeable, not_draft, or min_approvals=N. Invalid criteria fail the action; an explicitly empty list evaluates to PASS.noapproved
pass_labelsA comma-separated list of labels to apply when evaluation passesno""
pass_labels_cleanupA comma-separated list of labels to remove when evaluation passesno""
fail_labelsA comma-separated list of labels to apply when evaluation failsno""
exclude_checksA case-sensitive comma-separated list of exact check names to exclude from CI evaluationno""
transitionIn branch-deploy mode, exactly `reset`, `review`, `noop`, `deploy`, or `clear`; omit to resolve a supported GitHub eventno""
expected_head_shaIn branch-deploy mode, the pull request head SHA observed by a reset, noop, or deploy transitionno""
operation_resultIn branch-deploy mode, exactly `success`, `failure`, `cancelled`, or `skipped` for noop and deploy transitionsno""
noop_labelBranch-deploy label for a pull request waiting for noopnoready-for-noop
review_labelBranch-deploy label for a pull request waiting for reviewnoready-for-review
deploy_labelBranch-deploy label for a pull request waiting for deploymentnoready-for-deployment
merge_labelBranch-deploy label for a pull request waiting to mergenoready-to-merge
clear_on_draftWhether branch-deploy mode clears managed labels while the pull request is a draftnotrue
demote_merge_on_review_failureWhether a review failure moves the merge state back to waiting for reviewnotrue
dry_runWhether branch-deploy mode reports the desired state without changing labelsnofalse
namedescription
branch_deploy_reconciledIn branch-deploy mode, true when the event was reconciled and false when it was intentionally ignored
branch_deploy_stateIn branch-deploy mode, the converged state: cleared, noop, review, deploy, or merge
head_shaThe current pull request head commit SHA
head_matchesIn branch-deploy mode, true when expected_head_sha matches the live head for reset, noop, or deploy, false when stale; empty otherwise
approvedThe string "true" when reviewDecision is APPROVED or null, and "false" otherwise
total_approvalsThe number of unique non-bot actors whose latest review is APPROVED
review_decisionThe pull request review decision, such as APPROVED, CHANGES_REQUESTED, or REVIEW_REQUIRED; empty when GitHub returns null
merge_state_statusThe pull request merge state status: CLEAN, DIRTY, BLOCKED, BEHIND, UNSTABLE, HAS_HOOKS, or UNKNOWN
mergeable_stateThe pull request mergeable state: MERGEABLE, CONFLICTING, or UNKNOWN
commit_statusThe normalized CI status for the latest commit: SUCCESS, FAILURE, PENDING, or UNKNOWN
is_draftThe string "true" if the pull request is in draft status, "false" otherwise
evaluationPASS or FAIL after ANDing every requested criterion. FAIL is a normal result and does not fail the action step.