(
installation_id: str, owner: str, repo: str, issue: str, body: str
)
| 119 | |
| 120 | |
| 121 | def post_comment_to_github( |
| 122 | installation_id: str, owner: str, repo: str, issue: str, body: str |
| 123 | ) -> dict[str, Any]: |
| 124 | url = f"{GITHUB_API_URL}repos/{owner}/{repo}/issues/{issue}/comments" |
| 125 | headers = build_request_headers(installation_id) |
| 126 | payload = {"body": body} |
| 127 | response = requests.post( |
| 128 | url, json=payload, headers=headers, timeout=GITHUB_API_CALLS_TIMEOUT |
| 129 | ) |
| 130 | response.raise_for_status() |
| 131 | |
| 132 | return response.json() # type: ignore[no-any-return] |
| 133 | |
| 134 | |
| 135 | def delete_github_installation(installation_id: str) -> requests.Response: # type: ignore[return] |
no test coverage detected
searching dependent graphs…