$ name: AI Code Review on: pull_request: types: [opened, synchronize, reopened] jobs: review: runs-on: ubuntu-latest permissions: contents: read pull-requests: write steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # need full history for diffs - name: Set up Node uses: actions/setup-node@v4 with: node-version: '20' - name: Install 2ndOpinion CLI run: -weight: 500;">npm -weight: 500;">install -g 2ndopinion-cli - name: Run multi-model review env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | 2ndopinion review \ --base origin/${{ github.base_ref }} \ --head HEAD \ --format github-comment \ --severity-threshold medium \ --comment-pr ${{ github.event.pull_request.number }}
name: AI Code Review on: pull_request: types: [opened, synchronize, reopened] jobs: review: runs-on: ubuntu-latest permissions: contents: read pull-requests: write steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # need full history for diffs - name: Set up Node uses: actions/setup-node@v4 with: node-version: '20' - name: Install 2ndOpinion CLI run: -weight: 500;">npm -weight: 500;">install -g 2ndopinion-cli - name: Run multi-model review env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | 2ndopinion review \ --base origin/${{ github.base_ref }} \ --head HEAD \ --format github-comment \ --severity-threshold medium \ --comment-pr ${{ github.event.pull_request.number }}
name: AI Code Review on: pull_request: types: [opened, synchronize, reopened] jobs: review: runs-on: ubuntu-latest permissions: contents: read pull-requests: write steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # need full history for diffs - name: Set up Node uses: actions/setup-node@v4 with: node-version: '20' - name: Install 2ndOpinion CLI run: -weight: 500;">npm -weight: 500;">install -g 2ndopinion-cli - name: Run multi-model review env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | 2ndopinion review \ --base origin/${{ github.base_ref }} \ --head HEAD \ --format github-comment \ --severity-threshold medium \ --comment-pr ${{ github.event.pull_request.number }}
2ndopinion review \ --base origin/${{ github.base_ref }} \ --head HEAD \ --format github-comment \ --severity-threshold medium \ --fail-on high \ --comment-pr ${{ github.event.pull_request.number }}
2ndopinion review \ --base origin/${{ github.base_ref }} \ --head HEAD \ --format github-comment \ --severity-threshold medium \ --fail-on high \ --comment-pr ${{ github.event.pull_request.number }}
2ndopinion review \ --base origin/${{ github.base_ref }} \ --head HEAD \ --format github-comment \ --severity-threshold medium \ --fail-on high \ --comment-pr ${{ github.event.pull_request.number }}
--fail-on high --consensus-required 3
--fail-on high --consensus-required 3
--fail-on high --consensus-required 3
ai-code-review: stage: test image: node:20 rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' variables: GIT_DEPTH: 0 script: - -weight: 500;">npm -weight: 500;">install -g 2ndopinion-cli - 2ndopinion review --base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME --head HEAD --format gitlab-note --severity-threshold medium --comment-mr $CI_MERGE_REQUEST_IID
ai-code-review: stage: test image: node:20 rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' variables: GIT_DEPTH: 0 script: - -weight: 500;">npm -weight: 500;">install -g 2ndopinion-cli - 2ndopinion review --base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME --head HEAD --format gitlab-note --severity-threshold medium --comment-mr $CI_MERGE_REQUEST_IID
ai-code-review: stage: test image: node:20 rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' variables: GIT_DEPTH: 0 script: - -weight: 500;">npm -weight: 500;">install -g 2ndopinion-cli - 2ndopinion review --base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME --head HEAD --format gitlab-note --severity-threshold medium --comment-mr $CI_MERGE_REQUEST_IID
version: 2.1
jobs: ai-review: -weight: 500;">docker: - image: cimg/node:20.11 steps: - checkout - run: -weight: 500;">npm -weight: 500;">install -g 2ndopinion-cli - run: name: Run review command: | 2ndopinion review \ --base origin/main \ --head HEAD \ --format json \ --output review.json - store_artifacts: path: review.json
version: 2.1
jobs: ai-review: -weight: 500;">docker: - image: cimg/node:20.11 steps: - checkout - run: -weight: 500;">npm -weight: 500;">install -g 2ndopinion-cli - run: name: Run review command: | 2ndopinion review \ --base origin/main \ --head HEAD \ --format json \ --output review.json - store_artifacts: path: review.json
version: 2.1
jobs: ai-review: -weight: 500;">docker: - image: cimg/node:20.11 steps: - checkout - run: -weight: 500;">npm -weight: 500;">install -g 2ndopinion-cli - run: name: Run review command: | 2ndopinion review \ --base origin/main \ --head HEAD \ --format json \ --output review.json - store_artifacts: path: review.json - Informational mode. Every PR runs the review. Findings are posted as a comment or check annotation. Nothing blocks merge. Humans decide what to do.
- Blocking mode. Review runs on every PR. If the consensus surface flags a HIGH severity finding, the check fails and merge is blocked until the author either fixes it or someone with override permission ships anyway. - 3-of-3 agree (HIGH): posted as a HIGH finding, blocks merge if --fail-on high is set.
- 2-of-3 agree (HIGH): posted as a HIGH finding with the dissenting model's argument attached, blocks if --consensus-required 2.
- 1-of-3 (HIGH): posted as a NOTE-level finding with the model's argument and the other two models' counter-arguments. Never blocks. Visible to humans.