Skip to content

Commit

Permalink
Sync mypy_primer_comment with typeshed (#12125)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Feb 6, 2022
1 parent 26fdd45 commit 48dc990
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/mypy_primer_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,17 @@ jobs:
console.log("Diff from mypy_primer:")
console.log(data)
let body
if (data.trim()) {
const 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 + '```'
await github.issues.createComment({
issue_number: fs.readFileSync("pr_number.txt", { encoding: "utf8" }),
owner: context.repo.owner,
repo: context.repo.repo,
body
})
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. 🤖🎉'
}
const prNumber = parseInt(fs.readFileSync("pr_number.txt", { encoding: "utf8" }))
await github.issues.createComment({
issue_number: prNumber,
owner: context.repo.owner,
repo: context.repo.repo,
body
})
return prNumber

0 comments on commit 48dc990

Please sign in to comment.