Merge pull request #1496 from adangel/fix-action-annotations

GitHub Actions annotations not showing up
This commit is contained in:
Ed Page authored and GitHub committed 2026-02-06 09:57:58 -06:00
commit adf71f7a2b
1 file changed
+6 -5
+6 -5
View File
@@ -2,8 +2,9 @@
set -eu
grep '"type":"typo"' |
jq --sort-keys --raw-output '"::warning file=\(.path),line=\(.line_num),col=\(.byte_offset)::\"\(.typo)\" should be \"" + (.corrections // [] | join("\" or \"") + "\".")' |
while IFS= read -r line; do
echo "$line"
done
grep '"type":"typo"' | while IFS= read -r typo; do
original_path="$(echo "$typo" | jq --raw-output '.path')"
relative_path="$(realpath --relative-to="$GITHUB_WORKSPACE" "$original_path")"
echo "$typo" | jq --arg relative_path "$relative_path" --raw-output \
'"::warning file=\($relative_path),line=\(.line_num),col=\(.byte_offset + 1)::\"\(.typo)\" should be \"" + (.corrections // [] | join("\" or \"") + "\".")'
done