(
installation_id: str, owner: str, repo: str, issue: str
)
| 327 | |
| 328 | |
| 329 | def label_github_issue_pr( |
| 330 | installation_id: str, owner: str, repo: str, issue: str |
| 331 | ) -> dict[str, Any]: |
| 332 | # Label linked GitHub Issue or PR with the "Flagsmith Flag" label |
| 333 | url = f"{GITHUB_API_URL}repos/{owner}/{repo}/issues/{issue}/labels" |
| 334 | headers = build_request_headers(installation_id) |
| 335 | payload = [GITHUB_FLAGSMITH_LABEL] |
| 336 | response = requests.post( |
| 337 | url, json=payload, headers=headers, timeout=GITHUB_API_CALLS_TIMEOUT |
| 338 | ) |
| 339 | response.raise_for_status() |
| 340 | return response.json() # type: ignore[no-any-return] |
no test coverage detected
searching dependent graphs…