mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-17 05:57:21 -05:00
Disable Auto-Approve AI PRs Disable auto-approve-ai workflow (auto pass)workflow
Disabled the auto-approve workflow and removed all associated steps.
This commit is contained in:
91
.github/workflows/auto-approve-ai.yml
vendored
91
.github/workflows/auto-approve-ai.yml
vendored
@@ -1,89 +1,8 @@
|
||||
name: Auto-Approve AI PRs
|
||||
|
||||
name: Disabled Workflow
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, labeled]
|
||||
status: {}
|
||||
check_run:
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
auto-approve:
|
||||
disable:
|
||||
if: false
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
(contains(github.event.pull_request.labels.*.name, 'claude-auto') ||
|
||||
contains(github.event.pull_request.labels.*.name, 'atlas-auto') ||
|
||||
contains(github.event.pull_request.labels.*.name, 'codex-auto')) &&
|
||||
!contains(github.event.pull_request.labels.*.name, 'breaking-change') &&
|
||||
!contains(github.event.pull_request.labels.*.name, 'security') &&
|
||||
!contains(github.event.pull_request.labels.*.name, 'do-not-merge')
|
||||
|
||||
steps:
|
||||
- name: Check PR size
|
||||
id: size
|
||||
run: |
|
||||
ADDITIONS=$(gh pr view ${{ github.event.pull_request.number }} --json additions --jq '.additions')
|
||||
DELETIONS=$(gh pr view ${{ github.event.pull_request.number }} --json deletions --jq '.deletions')
|
||||
TOTAL=$((ADDITIONS + DELETIONS))
|
||||
|
||||
echo "total_changes=$TOTAL" >> $GITHUB_OUTPUT
|
||||
|
||||
if [ $TOTAL -gt 500 ]; then
|
||||
echo "PR too large for auto-approval: $TOTAL lines changed (max 500)"
|
||||
gh pr comment ${{ github.event.pull_request.number }} --body "⚠️ **Auto-Approval Skipped**
|
||||
|
||||
This AI-generated PR is too large for automatic approval ($TOTAL lines changed, max 500).
|
||||
|
||||
**Action Required**: Human review needed.
|
||||
**Reason**: Large PRs require manual verification."
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Wait for all checks to pass
|
||||
uses: lewagon/wait-on-check-action@v1.3.1
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
running-workflow-name: 'auto-approve'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
wait-interval: 30
|
||||
allowed-conclusions: success
|
||||
|
||||
- name: Approve PR
|
||||
uses: hmarr/auto-approve-action@v3
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Add auto-merge label
|
||||
run: gh pr edit ${{ github.event.pull_request.number }} --add-label "auto-merge"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Comment on PR
|
||||
run: |
|
||||
AI_LABEL=""
|
||||
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'claude-auto') }}" == "true" ]]; then
|
||||
AI_LABEL="Claude"
|
||||
elif [[ "${{ contains(github.event.pull_request.labels.*.name, 'atlas-auto') }}" == "true" ]]; then
|
||||
AI_LABEL="Atlas"
|
||||
else
|
||||
AI_LABEL="Codex"
|
||||
fi
|
||||
|
||||
gh pr comment ${{ github.event.pull_request.number }} --body "🤖 **Auto-Approved (AI-Generated)**
|
||||
|
||||
This $AI_LABEL-generated PR has passed all checks and been automatically approved.
|
||||
|
||||
**Tier**: 4 (AI-Generated)
|
||||
**Size**: ${{ steps.size.outputs.total_changes }} lines
|
||||
**Policy**: AUTO_MERGE_POLICY.md#tier-4-ai-generated
|
||||
**Soak Time**: 5 minutes
|
||||
|
||||
Auto-merge will proceed after a 5-minute soak period. This gives humans time to review if needed."
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps: []
|
||||
|
||||
Reference in New Issue
Block a user