Skip to content

Commit 4ce65aa

Browse files
author
baton-admin[bot]
committed
chore: update CI workflows via baton-admin
1 parent e3a21bd commit 4ce65aa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/generate-baton-metadata.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,12 @@ jobs:
9999
100100
BASE_SHA=$(git merge-base HEAD origin/main 2>/dev/null || echo "")
101101
102-
# Compare PR's committed metadata with main to detect changes in this PR
102+
# Compare PR's committed metadata with main using semantic JSON comparison
103+
# (jq -cS normalizes formatting so whitespace-only changes don't trigger docs requirement)
103104
if [ -n "$BASE_SHA" ]; then
104-
if ! git diff --quiet "$BASE_SHA" HEAD -- baton_capabilities.json 2>/dev/null; then
105+
BASE_CAPS=$(git show "$BASE_SHA:baton_capabilities.json" 2>/dev/null | jq -cS . 2>/dev/null || echo "")
106+
HEAD_CAPS=$(jq -cS . baton_capabilities.json 2>/dev/null || echo "")
107+
if [ "$BASE_CAPS" != "$HEAD_CAPS" ]; then
105108
CAPS_CHANGED=true
106109
fi
107110
fi

0 commit comments

Comments
 (0)