Browse Source

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
darrenhinde 6 months ago
parent
commit
ac48d4ab7b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      .github/workflows/validate-registry.yml

+ 7 - 0
.github/workflows/validate-registry.yml

@@ -39,6 +39,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