(pr_number, repo, token)
| 147 | |
| 148 | |
| 149 | def get_comment_ids_to_delete(pr_number, repo, token): |
| 150 | ids = [] |
| 151 | page = 1 |
| 152 | while True: |
| 153 | comments = github_request( |
| 154 | "GET", |
| 155 | f"/issues/{pr_number}/comments", |
| 156 | token, |
| 157 | repo, |
| 158 | {"per_page": GITHUB_PER_PAGE, "page": page}, |
| 159 | ) |
| 160 | for comment in comments: |
| 161 | if CHECKS_HEADER in comment["body"]: |
| 162 | ids.append(comment["id"]) |
| 163 | if len(comments) < GITHUB_PER_PAGE: |
| 164 | break |
| 165 | page += 1 |
| 166 | return ids |
| 167 | |
| 168 | |
| 169 | def strip_html_comments(text): |
no test coverage detected