8000 Merge pull request #28130 from hauntsaninja/fix-numpy-comment · melissawm/numpy@d02bde8 · GitHub
[go: up one dir, main page]

Skip to content

Commit d02bde8

Browse files
authored
Merge pull request numpy#28130 from hauntsaninja/fix-numpy-comment
CI: Fix mypy_primer comment workflow
2 parents 94132ac + e242a75 commit d02bde8

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

.github/workflows/mypy_primer_comment.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ jobs:
1717
runs-on: ubuntu-latest
1818
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1919
steps:
20-
- name: Hide old comments
21-
uses: kanga333/comment-hider@c12bb20b48aeb8fc098e35967de8d4f8018fffdf # v0.4.0
22-
with:
23-
github_token: ${{ secrets.GITHUB_TOKEN }}
24-
issue_number: ${{ steps.post-comment.outputs.result }}
25-
2620
- name: Download diffs
2721
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
2822
with:
@@ -45,8 +39,22 @@ jobs:
4539
fs.writeFileSync("diff.zip", Buffer.from(download.data));
4640
4741
- run: unzip diff.zip
48-
- run: |
49-
cat diff_*.txt | tee fulldiff.txt
42+
43+
- name B72D : Get PR number
44+
id: get-pr-number
45+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
46+
with:
47+
script: |
48+
const fs = require('fs');
49+
return parseInt(fs.readFileSync("pr_number.txt", { encoding: "utf8" }))
50+
51+
- name: Hide old comments
52+
uses: kanga333/comment-hider@c12bb20b48aeb8fc098e35967de8d4f8018fffdf # v0.4.0
53+
with:
54+
github_token: ${{ secrets.GITHUB_TOKEN }}
55+
issue_number: ${{ steps.get-pr-number.outputs.result }}
56+
57+
- run: cat diff_*.txt | tee fulldiff.txt
5058

5159
- name: Post comment
5260
id: post-comment
@@ -93,4 +101,3 @@ jobs:
93101
body
94102
})
95103
}
96-
return prNumber

0 commit comments

Comments
 (0)
0