Skip to content

Commit e36e9bf

Browse files
committed
apply to base branch
1 parent bb50a32 commit e36e9bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/check-url-changes.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919

2020
- name: Identify deleted and renamed files
2121
run: |
22-
BASE_REF=origin/${{ github.event.pull_request.base.ref }}
22+
BASE_BRANCH=${{ github.event.pull_request.base.ref }}
2323
HEAD_SHA=${{ github.event.pull_request.head.sha }}
24+
BASE_REF="origin/${BASE_BRANCH}"
2425
26+
git fetch origin "${BASE_BRANCH}" --depth=1
2527
2628
DELETED_FILES=$(git diff --name-status "$BASE_REF" "$HEAD_SHA" | grep '^D.*\.md$' | cut -f2- || true)
2729
RENAMED_FILES=$(git diff --name-status "$BASE_REF" "$HEAD_SHA" | grep '^R.*\.md$' | awk '{print $2 " -> " $3}' || true)
@@ -109,4 +111,4 @@ jobs:
109111
repo: context.repo.repo,
110112
issue_number: context.payload.pull_request.number,
111113
body: sections.join('\n\n')
112-
});
114+
});

0 commit comments

Comments
 (0)