Skip to content

Commit 52676dc

Browse files
Updating file '.github/workflows/validate.yml' with otterdog.
1 parent 6bae425 commit 52676dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/validate.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ jobs:
7878
working-directory: otterdog-configs
7979

8080
- name: Generate canonical diff
81-
run: ../otterdog/otterdog.sh canonical-diff ${{ github.repository_owner }} -c otterdog.json | tee "$GITHUB_WORKSPACE/canonical-diff.txt"
81+
run: |
82+
../otterdog/otterdog.sh canonical-diff ${{ github.repository_owner }} -c otterdog.json | tee "$GITHUB_WORKSPACE/canonical-diff-ansi.txt"
83+
# filter out ansi escape sequences
84+
cat "$GITHUB_WORKSPACE/canonical-diff-ansi.txt" | sed -e 's/\x1b\[[0-9;]*m//g' | sed -E 's/^([[:space:]]+)([-+!])/\2\1/g' | sed -E 's/^([[:space:]]+)([~])/!\1/g' > "$GITHUB_WORKSPACE/canonical-diff.txt"
8285
working-directory: otterdog-configs
8386

8487
# Add a comment to the pull request with the diff

0 commit comments

Comments
 (0)