grantbirki/pr-status
A dependency-free runtime action that checks pull request status on GitHub.com
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jun 16, 2026
- License
- MIT
Pinned Snippet
uses: grantbirki/pr-status@90636f5a04ca4a039bfae198f9bf74996fa636df # v3.0.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| github_token | The GitHub.com token used to read pull request state and, when requested, reconcile labels | yes | ${{ github.token }} |
| mode | Exactly `status` for the existing evaluation behavior or `branch-deploy` for exact branch-deploy-status label reconciliation | no | status |
| workflow | The exact, case-sensitive current job/check name to exclude so this action does not evaluate itself | no | ${{ github.job }} |
| pr_number | A positive integer identifying the pull request to evaluate; branch-deploy mode resolves supported events when omitted | no | "" |
| checks | Exactly `required` or `all`, selecting which CI checks to evaluate | yes | all |
| evaluations | A 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. | no | approved |
| pass_labels | A comma-separated list of labels to apply when evaluation passes | no | "" |
| pass_labels_cleanup | A comma-separated list of labels to remove when evaluation passes | no | "" |
| fail_labels | A comma-separated list of labels to apply when evaluation fails | no | "" |
| exclude_checks | A case-sensitive comma-separated list of exact check names to exclude from CI evaluation | no | "" |
| transition | In branch-deploy mode, exactly `reset`, `review`, `noop`, `deploy`, or `clear`; omit to resolve a supported GitHub event | no | "" |
| expected_head_sha | In branch-deploy mode, the pull request head SHA observed by a reset, noop, or deploy transition | no | "" |
| operation_result | In branch-deploy mode, exactly `success`, `failure`, `cancelled`, or `skipped` for noop and deploy transitions | no | "" |
| noop_label | Branch-deploy label for a pull request waiting for noop | no | ready-for-noop |
| review_label | Branch-deploy label for a pull request waiting for review | no | ready-for-review |
| deploy_label | Branch-deploy label for a pull request waiting for deployment | no | ready-for-deployment |
| merge_label | Branch-deploy label for a pull request waiting to merge | no | ready-to-merge |
| clear_on_draft | Whether branch-deploy mode clears managed labels while the pull request is a draft | no | true |
| demote_merge_on_review_failure | Whether a review failure moves the merge state back to waiting for review | no | true |
| dry_run | Whether branch-deploy mode reports the desired state without changing labels | no | false |
Outputs
| name | description |
|---|---|
| branch_deploy_reconciled | In branch-deploy mode, true when the event was reconciled and false when it was intentionally ignored |
| branch_deploy_state | In branch-deploy mode, the converged state: cleared, noop, review, deploy, or merge |
| head_sha | The current pull request head commit SHA |
| head_matches | In branch-deploy mode, true when expected_head_sha matches the live head for reset, noop, or deploy, false when stale; empty otherwise |
| approved | The string "true" when reviewDecision is APPROVED or null, and "false" otherwise |
| total_approvals | The number of unique non-bot actors whose latest review is APPROVED |
| review_decision | The pull request review decision, such as APPROVED, CHANGES_REQUESTED, or REVIEW_REQUIRED; empty when GitHub returns null |
| merge_state_status | The pull request merge state status: CLEAN, DIRTY, BLOCKED, BEHIND, UNSTABLE, HAS_HOOKS, or UNKNOWN |
| mergeable_state | The pull request mergeable state: MERGEABLE, CONFLICTING, or UNKNOWN |
| commit_status | The normalized CI status for the latest commit: SUCCESS, FAILURE, PENDING, or UNKNOWN |
| is_draft | The string "true" if the pull request is in draft status, "false" otherwise |
| evaluation | PASS or FAIL after ANDing every requested criterion. FAIL is a normal result and does not fail the action step. |