diff --git a/.github/workflows/mypy_primer.yaml b/.github/workflows/mypy_primer.yaml index 42333f7978..3c2ec37b7f 100644 --- a/.github/workflows/mypy_primer.yaml +++ b/.github/workflows/mypy_primer.yaml @@ -61,16 +61,22 @@ jobs: echo "Running mypy_primer" ( - uvx --from "git+https://github.com/astral-sh/mypy_primer.git@add-red-knot-support" mypy_primer \ + uvx --verbose --from "git+https://github.com/astral-sh/mypy_primer.git@add-red-knot-support" mypy_primer \ --repo ruff \ --type-checker knot \ --old base_commit \ --new "$GITHUB_SHA" \ --project-selector '/(mypy_primer|black|pyp|git-revise|zipp|arrow)$' \ --output concise \ - --debug | tee /dev/stdout | sed -e 's/\x1b\[[0-9;]*m//g' > mypy_primer.diff + --debug > mypy_primer.diff ) || [ $? -eq 1 ] + # Output diff with ANSI color codes + cat mypy_primer.diff + + # Remove ANSI color codes before uploading + sed -ie 's/\x1b\[[0-9;]*m//g' mypy_primer.diff + echo ${{ github.event.number }} > pr-number - name: Upload diff diff --git a/.github/workflows/mypy_primer_comment.yaml b/.github/workflows/mypy_primer_comment.yaml index f44fbfe1d1..c9d95f9e6e 100644 --- a/.github/workflows/mypy_primer_comment.yaml +++ b/.github/workflows/mypy_primer_comment.yaml @@ -63,9 +63,13 @@ jobs: echo '## `mypy_primer` results' >> comment.txt if [ -s "pr/mypy_primer_diff/mypy_primer.diff" ]; then + echo '
' >> comment.txt + echo 'Changes were detected when running on open source projects' >> comment.txt + echo '' >> comment.txt echo '```diff' >> comment.txt cat pr/mypy_primer_diff/mypy_primer.diff >> comment.txt echo '```' >> comment.txt + echo '
' >> comment.txt else echo 'No ecosystem changes detected ✅' >> comment.txt fi