Skip to content

feat(fleet): implement F1-F7 dispatch-path fixes #198

feat(fleet): implement F1-F7 dispatch-path fixes

feat(fleet): implement F1-F7 dispatch-path fixes #198

Workflow file for this run

name: Code Review
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review, labeled]
permissions:
contents: read
pull-requests: write
# Budget-friendly default for gitguardex-managed projects: cancel
# superseded runs on the same PR so rapid agent pushes don't fan-out
# the OpenAI bill.
concurrency:
group: cr-${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
review:
# Skip on draft PRs and on `agent/*` head branches by default.
# Agent PRs can opt-in by applying the `needs-review` label —
# useful for the occasional agent PR that genuinely needs AI
# eyes (security-sensitive change, public-API redesign, etc.).
# Human-authored PRs (any non-`agent/*` head branch) always run.
if: >-
github.event.pull_request.draft == false &&
(
!startsWith(github.event.pull_request.head.ref, 'agent/') ||
contains(github.event.pull_request.labels.*.name, 'needs-review') ||
(github.event.action == 'labeled' && github.event.label.name == 'needs-review')
)
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- name: Skip when OPENAI_API_KEY is missing
if: ${{ env.OPENAI_API_KEY == '' }}
run: echo "OPENAI_API_KEY is not configured; skipping Code Review workflow."
- uses: anc95/ChatGPT-CodeReview@1e3df152c1b85c12da580b206c91ad343460c584 # v1.0.23
if: ${{ env.OPENAI_API_KEY != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ env.OPENAI_API_KEY }}
OPENAI_API_ENDPOINT: https://api.openai.com/v1
MODEL: gpt-4o-mini