From 148b53005aa2fbb15c4858ce18eb9ff7a90b7cf9 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sun, 28 Jun 2026 08:35:55 +0000 Subject: [PATCH] fix(ci): use --repo flag in gh pr diff to avoid checkout The pr-metadata-checks workflow was failing because gh pr diff requires a git repository context when run without target repository information. We now explicitly pass the repository using the --repo flag, allowing the job to run successfully without needing a full repository checkout. --- .github/workflows/pr-metadata-checks.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-metadata-checks.yaml b/.github/workflows/pr-metadata-checks.yaml index 003b4d99a5..e49ed14810 100644 --- a/.github/workflows/pr-metadata-checks.yaml +++ b/.github/workflows/pr-metadata-checks.yaml @@ -44,7 +44,9 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} run: | echo "Checking for blocked files..." - changed_files=$(gh pr diff "$PR_NUMBER" --name-only) + # We use --repo to avoid needing actions/checkout. + # This keeps the job lightweight and avoids "not a git repository" errors. + changed_files=$(gh pr diff "$PR_NUMBER" --name-only --repo "${{ github.repository }}") blocked_files=$(echo "$changed_files" | grep -E '^.agents/(plans|scratch)(/|$)' || true) if [ -n "$blocked_files" ]; then echo "::error::Files in .agents/plans and" \