From f03ad4523abf3394fdc68be5d527c44c81b2ad62 Mon Sep 17 00:00:00 2001 From: Darren Hinde <107584450+darrenhinde@users.noreply.github.com> Date: Sun, 18 Jan 2026 18:15:03 +0000 Subject: [PATCH] fix: Enable manual validation workflow for bot-created PRs (#109) * fix: Add repository checkout before getting PR details in manual workflow runs - Fixes 'fatal: not a git repository' error when manually triggering validate-registry workflow - Adds initial checkout step for workflow_dispatch events before gh pr view command - Allows manual validation of bot-created PRs (version bumps, doc syncs) - Resolves issue preventing PR #106 from being merged * fix: Use pull_request_target to allow workflow on bot PRs - Add pull_request_target trigger to validate-registry workflow - Allows workflow to run automatically on bot-created PRs (version bumps, doc syncs) - Fixes issue where PR #106 and similar bot PRs are blocked - pull_request_target runs with base branch permissions, safe for bot PRs --- .github/workflows/validate-registry.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/validate-registry.yml b/.github/workflows/validate-registry.yml index fb278ec..93ebd37 100644 --- a/.github/workflows/validate-registry.yml +++ b/.github/workflows/validate-registry.yml @@ -18,6 +18,11 @@ on: - dev # Removed paths filter - this check is required by repository ruleset # so it must run on ALL PRs to prevent blocking merges + pull_request_target: + branches: + - main + - dev + # pull_request_target allows workflows to run on bot-created PRs workflow_dispatch: inputs: pr_number: @@ -39,6 +44,13 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout repository (for manual runs) + if: github.event_name == 'workflow_dispatch' + 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 != '' id: get_pr