Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/copilot-review-approval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ jobs:
echo "Checking if sensitive files have been modified..."

SENSITIVE_PATTERNS='
.github/workflows/
\.github/workflows/
'
CHANGED_FILES=$(gh pr view "$PR_URL" --repo "$REPO" --json files | jq -r '.files[].path')
for pattern in $SENSITIVE_PATTERNS; do
if echo "$CHANGED_FILES" | grep -q "^$pattern"; then
if echo "$CHANGED_FILES" | grep -qE "^$pattern"; then
echo "PR modifies sensitive file(s) matching pattern: $pattern"
echo "Auto-approval is not allowed for PRs that modify workflow, dependency, or security-sensitive files."
exit 0
Expand Down