MCPcopy
hub / github.com/django/django / get_comment_ids_to_delete

Function get_comment_ids_to_delete

scripts/pr_quality/check_pr.py:149–166  ·  view source on GitHub ↗
(pr_number, repo, token)

Source from the content-addressed store, hash-verified

147
148
149def 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
169def strip_html_comments(text):

Callers 1

mainFunction · 0.85

Calls 2

github_requestFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected