Skip to content

Review gate

Source: actions/universal-review-gate/action.yml

Sets a commit status on the PR head that turns green once the AI review bot reviewed exactly that commit and, for high-risk results, a writer approved it. An approval of the head commit alone also turns it green.

Usage

- uses: futuredapp/.github/.github/actions/universal-review-gate@2.10.1
  with:
    github_token: '...'
    pr_number: '...'

Inputs

Name Type Required Default Description
github_token string Yes — Token with statuses:write and read access to pull requests and issues.
pr_number string Yes — Pull request number. The status is always set on the current PR head.
review_base_branches string No ["develop"] JSON array of base branches whose PRs need the AI review. PRs into other branches get a green status.
marker string No <!-- ai-pr-review sha= Start of the first line of the AI review comment.
bot_login string No github-actions[bot] Login of the account that posts the AI review comment. Comments from anyone else are ignored.
human_review_label string No needs-human Label that requires an approving review, in addition to high-risk AI results.
status_context string No review-gate Commit status context. Add this name as a required status check in the branch ruleset.

Additional Details

Usage

- uses: futuredapp/.github/.github/actions/universal-review-gate@main
  with:
    github_token: ${{ github.token }}
    pr_number: ${{ github.event.pull_request.number }}

The job needs statuses: write, pull-requests: read and issues: read.

A commit status can be set by anyone with write access to the repository, so the gate protects against mistakes, not against a colleague who bypasses it on purpose.