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

Function post_comment_to_github

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

Source from the content-addressed store, hash-verified

119
120
121def 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
135def delete_github_installation(installation_id: str) -> requests.Response: # type: ignore[return]

Callers 1

send_post_requestFunction · 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…