File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -44,22 +44,26 @@ jobs:
4444 response=$(curl -s -H "Authorization: Bearer $TOKEN" "$API_BASE/")
4545 echo "🔍 GET response:"
4646 echo "$response" | jq . || true
47- # 4. Collect changed JSON files and build payload
47+
48+
49+
50+
51+ # 4. Collect & inspect changed JSON files
4852 - name : 📁 Collect & inspect changed JSON files
4953 id : prepare_json_files
5054 run : |
5155 echo "🔍 Finding changed JSON files..."
52- # Determine base & head refs
5356 BASE_BRANCH=${{ github.event.pull_request.base.ref }}
5457 HEAD_SHA=${{ github.event.pull_request.head.sha }}
5558 echo "Base branch: $BASE_BRANCH"
5659 echo "Head SHA: $HEAD_SHA"
5760
58- # Fetch the base branch so git diff works
59- git fetch origin $BASE_BRANCH
61+ # Checkout PR head (already done), now fetch & create local base branch
62+ git fetch origin $BASE_BRANCH:$BASE_BRANCH
63+ echo "✅ Fetched base branch locally as '$BASE_BRANCH'"
6064
6165 # List all changed files between base and head
62- all_changed=$(git diff --name-only origin/ $BASE_BRANCH $HEAD_SHA)
66+ all_changed=$(git diff --name-only $BASE_BRANCH $HEAD_SHA)
6367 echo "🔁 All changed files:"
6468 echo "$all_changed"
6569
You can’t perform that action at this time.
0 commit comments