From 802464cff3dafb2bf9951d69c24d56fb0edecc06 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Mar 2026 20:30:40 +0000 Subject: [PATCH] Fix frontmatter validation to skip deleted files The workflow was passing deleted files to the validation script, which failed when trying to read them. Add --diff-filter=AMRC to only process Added, Modified, Renamed, and Copied files. --- .github/workflows/validate-frontmatter.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-frontmatter.yml b/.github/workflows/validate-frontmatter.yml index 148364d..9de76f7 100644 --- a/.github/workflows/validate-frontmatter.yml +++ b/.github/workflows/validate-frontmatter.yml @@ -21,7 +21,8 @@ jobs: - name: Get changed frontmatter files id: changed run: | - FILES=$(gh pr diff ${{ github.event.pull_request.number }} --name-only | grep -E '(agents/.*\.md|skills/.*/SKILL\.md|commands/.*\.md)$' || true) + # Use diff-filter=AMRC to exclude deleted files (D) - only Added, Modified, Renamed, Copied + FILES=$(gh pr diff ${{ github.event.pull_request.number }} --name-only --diff-filter=AMRC | grep -E '(agents/.*\.md|skills/.*/SKILL\.md|commands/.*\.md)$' || true) echo "files<> "$GITHUB_OUTPUT" echo "$FILES" >> "$GITHUB_OUTPUT" echo "EOF" >> "$GITHUB_OUTPUT"