Right now typeshed and mypy have different techniques to hide old comments:
typeshed: https://github.com/python/typeshed/blob/62e33cbbd53e55334f5da8870f8f4b3ae8679ac2/.github/workflows/mypy_primer_comment.yml#L70-L76mypy: | # Based on https://github.com/kanga333/comment-hider |
| - name: Hide old comments |
| uses: actions/github-script@v3 |
| with: |
| github-token: ${{secrets.GITHUB_TOKEN}} |
| script: | |
| const fs = require('fs') |
| |
| const response = await github.issues.listComments({ |
| issue_number: fs.readFileSync("pr_number.txt", { encoding: "utf8" }), |
| owner: context.repo.owner, |
| repo: context.repo.repo, |
| }) |
| const botCommentIds = response.data |
| .filter(comment => comment.user.login === 'github-actions[bot]') |
| .map(comment => comment.node_id) |
| |
| for (const id of botCommentIds) { |
| const resp = await github.graphql(` |
| mutation { |
| minimizeComment(input: {classifier: OUTDATED, subjectId: "${id}"}) { |
| minimizedComment { |
| isMinimized |
| } |
| } |
| } |
| `) |
| if (resp.errors) { |
| throw new Error(resp.errors) |
| } |
| } |
I need to research whether these two are identical.
Maybe we can simplify mypy's action to be the same as typeshed's one.
Origin: #12125
Right now
typeshedandmypyhave different techniques to hide old comments:typeshed: https://github.com/python/typeshed/blob/62e33cbbd53e55334f5da8870f8f4b3ae8679ac2/.github/workflows/mypy_primer_comment.yml#L70-L76mypy:mypy/.github/workflows/mypy_primer_comment.yml
Lines 45 to 75 in 48dc990
I need to research whether these two are identical.
Maybe we can simplify
mypy's action to be the same astypeshed's one.Origin: #12125