Skip to content

OpenAI PR review

OpenAI PR review #4

name: OpenAI PR review
on:
workflow_run:
workflows: [OpenAI PR review request]
types: [completed]
permissions:
contents: read
pull-requests: write
jobs:
pull-request:
if: >-
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
outputs:
eligible: ${{ steps.pr.outputs.eligible }}
number: ${{ steps.pr.outputs.number }}
base_sha: ${{ steps.pr.outputs.base_sha }}
head_sha: ${{ steps.pr.outputs.head_sha }}
steps:
- name: Resolve pull request from unprivileged signal
id: pr
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
const [signaledPullRequest] = context.payload.workflow_run.pull_requests;
if (!signaledPullRequest) {
core.setOutput('eligible', 'false');
return;
}
const { data: pullRequest } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: signaledPullRequest.number,
});
const eligible = pullRequest.state === 'open' &&
!pullRequest.draft &&
pullRequest.head.repo?.fork === false;
core.setOutput('eligible', String(eligible));
core.setOutput('number', String(pullRequest.number));
core.setOutput('base_sha', pullRequest.base.sha);
core.setOutput('head_sha', pullRequest.head.sha);
review:

Check failure on line 49 in .github/workflows/openai-pr-review-dispatch.yml

View workflow run for this annotation

GitHub Actions / OpenAI PR review

Invalid workflow file

The workflow is not valid. .github/workflows/openai-pr-review-dispatch.yml (Line: 49, Col: 3): Error calling workflow 'GizClaw/github-workflows/.github/workflows/codex-openai-review.yml@f810d1f4822561c8a415afc00b5866774450d7d8'. The nested job 'review' is requesting 'issues: write', but is only allowed 'issues: none'.
needs: pull-request
if: needs.pull-request.outputs.eligible == 'true'
uses: ./.github/workflows/codex-openai-review.yml
with:
model: gpt-5.6-terra
effort: medium
review-instructions: >-
Review only the pull-request diff and report actionable findings.
pull_request_number: ${{ needs.pull-request.outputs.number }}
base_sha: ${{ needs.pull-request.outputs.base_sha }}
head_sha: ${{ needs.pull-request.outputs.head_sha }}
secrets:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}