From 254c8bf6db00a56b2e5c6f74bd6eb831da7cc310 Mon Sep 17 00:00:00 2001 From: Darren Hinde <107584450+darrenhinde@users.noreply.github.com> Date: Sun, 18 Jan 2026 18:17:01 +0000 Subject: [PATCH] fix: Add working admin bypass for validation workflow (#111) - Implement skip_validation flag that actually works - Admin can now bypass validation with: gh workflow run "Validate Registry on PR" -f pr_number=106 -f skip_validation=true - Workflow exits successfully when bypassed - Unblocks stuck bot PRs immediately --- .github/workflows/validate-registry.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-registry.yml b/.github/workflows/validate-registry.yml index 93ebd37..c06eca0 100644 --- a/.github/workflows/validate-registry.yml +++ b/.github/workflows/validate-registry.yml @@ -44,15 +44,24 @@ jobs: runs-on: ubuntu-latest steps: + - name: Admin bypass check + if: github.event_name == 'workflow_dispatch' && github.event.inputs.skip_validation == 'true' + run: | + echo "## ✅ Validation Bypassed (Admin Override)" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Validation checks skipped by maintainer." >> $GITHUB_STEP_SUMMARY + echo "PR: #${{ github.event.inputs.pr_number }}" >> $GITHUB_STEP_SUMMARY + exit 0 + - name: Checkout repository (for manual runs) - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' && github.event.inputs.skip_validation != 'true' uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - name: Get PR details (for manual runs) - if: github.event_name == 'workflow_dispatch' && github.event.inputs.pr_number != '' + if: github.event_name == 'workflow_dispatch' && github.event.inputs.pr_number != '' && github.event.inputs.skip_validation != 'true' id: get_pr run: | PR_DATA=$(gh pr view ${{ github.event.inputs.pr_number }} --json headRefName,headRepository,headRepositoryOwner) @@ -62,6 +71,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Checkout PR branch + if: github.event.inputs.skip_validation != 'true' uses: actions/checkout@v4 with: # For manual runs: use PR details from get_pr step