Skip to content

Publish AI PR review

Source: actions/universal-ai-pr-review-publish/action.yml

Adds the human review label and requests the project reviewer for high-risk results, then posts or updates the single AI review comment on a PR.

Usage

- uses: futuredapp/.github/.github/actions/universal-ai-pr-review-publish@2.10.1
  with:
    github_token: '...'
    pr_number: '...'
    result_file: '...'
    body_file: '...'

Inputs

Name Type Required Default Description
github_token string Yes — Token with write access to pull requests and issues.
pr_number string Yes — Pull request number.
reviewed_sha string No — Commit the result belongs to. When the PR head has moved on, nothing is published: the newer run will.
result_file string Yes — Path to the JSON result of the review (needs a top-level risk.level of low or high).
body_file string Yes — Path to the rendered markdown comment. Its first line must start with the marker.
marker string No <!-- ai-pr-review sha= Start of the first line of the AI review comment, used to find and update it.
bot_login string No github-actions[bot] Login of the account that posts the comment (the GITHUB_TOKEN identity). Only its comments are edited.
human_review_label string No needs-human Label added when the review classifies the PR as high risk.
feature_label string No feature-complete Label for PRs that complete a functional whole. Created here so every reviewed repository has it.
reviewer string No — GitHub login to request a review from on high-risk PRs (a team needs a token that can read org members, which GITHUB_TOKEN cannot). Empty requests nobody.

Additional Details

Usage

- uses: futuredapp/.github/.github/actions/universal-ai-pr-review-publish@main
  with:
    github_token: ${{ github.token }}
    pr_number: 42
    result_file: ${{ runner.temp }}/ai-review-out/result.json
    body_file: ${{ runner.temp }}/ai-review-out/comment.md
    reviewer: some-login

The job needs pull-requests: write and issues: write. A team reviewer (org/team) needs a token that can read organisation members, which GITHUB_TOKEN cannot; use a login.