File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 14
14
- name : Checkout repository
15
15
uses : actions/checkout@v5
16
16
with :
17
+ ref : ${{ github.event.pull_request.head.sha }}
17
18
fetch-depth : 0
18
19
19
20
- name : Set up Python
@@ -38,13 +39,21 @@ jobs:
38
39
39
40
# Discover changes
40
41
git show origin/${{ github.base_ref }}:sherlock_project/resources/data.json > data.json.base
42
+ cp sherlock_project/resources/data.json data.json.head
43
+
41
44
CHANGED=$(
42
- jq -r --slurpfile base data.json.base --slurpfile head sherlock_project/resources/data.json '
43
- [
44
- ($head[0] | keys_unsorted[]) as $key
45
- | select(($base[0][$key] != $head[0][$key]) or ($base[0][$key] | not))
46
- | $key
47
- ] | unique | join(",")'
45
+ python - <<'EOF'
46
+ import json
47
+ with open("data.json.base") as f: base = json.load(f)
48
+ with open("data.json.head") as f: head = json.load(f)
49
+
50
+ changed = []
51
+ for k, v in head.items():
52
+ if k not in base or base[k] != v:
53
+ changed.append(k)
54
+
55
+ print(",".join(sorted(changed)))
56
+ EOF
48
57
)
49
58
50
59
# Preserve changelist
You can’t perform that action at this time.
0 commit comments