MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / label_github_issue_pr

Function label_github_issue_pr

api/integrations/github/client.py:329–340  ·  view source on GitHub ↗
(
    installation_id: str, owner: str, repo: str, issue: str
)

Source from the content-addressed store, hash-verified

327
328
329def 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]

Callers 1

createMethod · 0.90

Calls 4

build_request_headersFunction · 0.85
postMethod · 0.45
raise_for_statusMethod · 0.45
jsonMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…