Skip to content

Commit 4194a31

Browse files
Update scripts/auto-approve-dependabot.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 4daf35f commit 4194a31

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/auto-approve-dependabot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ echo "$dependabot_prs" | jq -c '.[]' | while read -r pr; do
3939

4040
# Check if PR only modifies allowed files
4141
pr_files=$(gh pr view "$pr_number" -R "$REPO" --json files)
42-
invalid_files=$(echo "$pr_files" | jq -r '.files[].path' | grep -v -E '(Cargo\.toml|Cargo\.lock|package\.json|package-lock\.json)' || true)
42+
invalid_files=$(echo "$pr_files" | jq -r '.files[].path' | grep -v -E '(^|/)(Cargo\.toml|Cargo\.lock|package\.json|package-lock\.json)$' || true)
4343

4444
if [ -n "$invalid_files" ]; then
4545
echo " ❌ PR #$pr_number modifies files that are not allowed for auto-merge:"

0 commit comments

Comments
 (0)