File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1010 - " crates/ruff_python_ast"
1111 - " crates/ruff_python_parser"
1212 - " .github/workflows/mypy_primer.yaml"
13+ - " .github/workflows/mypy_primer_comment.yaml"
1314
1415concurrency :
1516 group : ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
6768 --new "$GITHUB_SHA" \
6869 --project-selector '/(mypy_primer|black|pyp|git-revise|zipp|arrow)$' \
6970 --output concise \
70- --debug | tee mypy_primer.diff
71+ --debug | tee /dev/stdout | sed -e 's/\x1b\[[0-9;]*m//g' > mypy_primer.diff
7172 ) || [ $? -eq 1 ]
7273
7374 echo ${{ github.event.number }} > pr-number
Original file line number Diff line number Diff line change 6262 echo '<!-- generated-comment mypy_primer -->' >> comment.txt
6363
6464 echo '## `mypy_primer` results' >> comment.txt
65- echo '```diff' >> comment.txt
66- cat pr/mypy_primer_diff/mypy_primer.diff >> comment.txt
67- echo '```' >> comment.txt
65+ if [ -s "pr/mypy_primer_diff/mypy_primer.diff" ]; then
66+ echo '```diff' >> comment.txt
67+ cat pr/mypy_primer_diff/mypy_primer.diff >> comment.txt
68+ echo '```' >> comment.txt
69+ else
70+ echo 'No ecosystem changes detected ✅' >> comment.txt
71+ fi
6872
6973 echo 'comment<<EOF' >> "$GITHUB_OUTPUT"
7074 cat comment.txt >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments