mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Always generate a comment for mypy_primer (#5197)
This way, runs without output after runs with output can be clearly determined. This also makes it easier to recognize when a run was not completed.
This commit is contained in:
16
.github/workflows/mypy_primer_comment.yml
vendored
16
.github/workflows/mypy_primer_comment.yml
vendored
@@ -89,11 +89,15 @@ jobs:
|
||||
|
||||
console.log("Diff from mypy_primer:")
|
||||
console.log(data)
|
||||
let body;
|
||||
if (data.trim()) {
|
||||
await github.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'Diff from [mypy_primer](https://github.com/hauntsaninja/mypy_primer), showing the effect of this PR on open source code:\n```diff\n' + data + '```'
|
||||
})
|
||||
body = 'Diff from [mypy_primer](https://github.com/hauntsaninja/mypy_primer), showing the effect of this PR on open source code:\n```diff\n' + data + '```'
|
||||
} else {
|
||||
body = 'According to [mypy_primer](https://github.com/hauntsaninja/mypy_primer), this change has no effect on the checked open source code. 🤖🎉'
|
||||
}
|
||||
await github.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user