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

Function create_github_issue

api/integrations/github/client.py:99–118  ·  view source on GitHub ↗
(
    github_pat: str,
    api_url: str,
    owner: str,
    repo: str,
    title: str,
    body: str,
)

Source from the content-addressed store, hash-verified

97
98
99def create_github_issue(
100 github_pat: str,
101 api_url: str,
102 owner: str,
103 repo: str,
104 title: str,
105 body: str,
106) -> dict[str, Any]:
107 url = f"{api_url}repos/{owner}/{repo}/issues"
108 headers = {
109 "X-GitHub-Api-Version": GITHUB_API_VERSION,
110 "Accept": "application/vnd.github.v3+json",
111 "Authorization": f"token {github_pat}",
112 }
113 payload = {"title": title, "body": body}
114 response = requests.post(
115 url, json=payload, headers=headers, timeout=GITHUB_API_CALLS_TIMEOUT
116 )
117 response.raise_for_status()
118 return response.json() # type: ignore[no-any-return]
119
120
121def post_comment_to_github(

Callers 1

create_cleanup_issueFunction · 0.90

Calls 3

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…