Skip to content

Commit 6471002

Browse files
committed
🔄 synced local '.github/workflows/validate-properties-links.yml' with remote '.releases/validate-properties-links.yml'
1 parent 2400288 commit 6471002

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/validate-properties-links.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
uses: actions/checkout@v6
2020
with:
2121
ref: ${{ github.event.pull_request.head.sha }}
22+
fetch-depth: 0
2223

2324
- name: Set up Python
2425
uses: actions/setup-python@v6
@@ -33,7 +34,11 @@ jobs:
3334
id: changed_files
3435
run: |
3536
# Get list of changed .properties files
36-
git fetch origin ${{ github.event.pull_request.base.ref }}
37+
# Make sure we have the base branch
38+
git fetch origin ${{ github.event.pull_request.base.ref }} --depth=1 || git fetch origin ${{ github.event.pull_request.base.ref }}
39+
40+
# Use ... to find changes between the common ancestor and HEAD
41+
# This is more robust for PRs
3742
CHANGED_FILES=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}...HEAD | grep '\.properties$' || true)
3843
3944
if [ -z "$CHANGED_FILES" ]; then

0 commit comments

Comments
 (0)