fix: narrow grep pattern to only match knowledge file table entries"

Agent-Logs-Url: https://github.com/microsoft/regorus/sessions/49fd3403-e001-40ce-858f-7397111fc0d5

Co-authored-by: anakrish <35780660+anakrish@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-25 21:50:36 +00:00
committed by GitHub
parent 29acccc407
commit 73ed93ed6f

View File

@@ -51,8 +51,8 @@ jobs:
- name: Validate knowledge file references
run: |
echo "Checking that all knowledge files referenced in instructions exist..."
# Extract knowledge file references from instructions
grep -oP '[a-z-]+\.md' .github/copilot-instructions.md | sort -u > /tmp/referenced.txt
# Extract knowledge file references from the table (lines starting with | `...` |)
grep -P '^\| `[a-z-]+\.md`' .github/copilot-instructions.md | grep -oP '`[a-z-]+\.md`' | tr -d '`' | sort -u > /tmp/referenced.txt
# List actual knowledge files
ls docs/knowledge/*.md 2>/dev/null | xargs -I{} basename {} | sort -u > /tmp/actual.txt