@@ -13,37 +13,13 @@ jobs:
1313 fetch-depth : 0
1414 - name : install esmeta
1515 uses : ./.github/workflows/esmeta-installer
16- - name : list added line numbers
17- id : collect
18- shell : bash
16+ - name : check for newly-introduced phrases
1917 env :
2018 FILE_PATH : spec.html
2119 BASE_SHA : ${{ github.event.pull_request.base.sha }}
2220 HEAD_SHA : ${{ github.sha }}
2321 run : |
24- # zero-context diff, limited to the file we care about
25- added_lines=$(git diff -U0 --no-color "${BASE_SHA}" "${HEAD_SHA}" -- "${FILE_PATH}" |
26- # keep only the hunk headers (the @@ lines)
27- awk '
28- # Example header: @@ -158,0 +159,2 @@
29- /^@@/ {
30- # Extract “+<start>[,<count>]” part
31- match($0, /\+([0-9]+)(,([0-9]+))?/, a)
32- start = a[1]
33- count = (a[3] == "" ? 1 : a[3])
34- # Print every line number in the added range
35- for (i = 0; i < count; i++) print start + i
36- }
37- ')
38-
39- # Join line numbers with comma or space (whichever format you need)
40- added_joined=$(echo "$added_lines" | paste -sd "," -)
41- added_lines_json="[$added_joined]"
42-
43- # Set it as an output value
44- echo "added_lines=$added_lines_json" >> "$GITHUB_OUTPUT"
45- - name : check for newly-introduced phrases
46- run : |
47- "${ESMETA_HOME}"/bin/esmeta extract \
48- -status \
49- -extract:warn-action <<< ${{ steps.collect.outputs.added_lines }}
22+ "${ESMETA_HOME}"/bin/esmeta yet-check \
23+ -status -yet-check:github-alert -yet-check:log \
24+ "${BASE_SHA}" "${HEAD_SHA}"
25+ cat "${ESMETA_HOME}"/logs/yet-check/summary.md >> $GITHUB_STEP_SUMMARY
0 commit comments