MCPcopy Index your code
hub / github.com/sdv-dev/SDV / post

Method post

scripts/github_client.py:83–101  ·  view source on GitHub ↗

Post to an endpooint in the GitHub API. Args: github_org (str): The name of the GitHub organization to search. repo (str): The name of the repository to search. endpoint (str): The endpoint for the resource.

(self, github_org: str, repo: str, endpoint: str, payload: dict)

Source from the content-addressed store, hash-verified

81 return requests.get(url, headers=self.headers, params=query_params, timeout=timeout)
82
83 def post(self, github_org: str, repo: str, endpoint: str, payload: dict):
84 """Post to an endpooint in the GitHub API.
85
86 Args:
87 github_org (str):
88 The name of the GitHub organization to search.
89 repo (str):
90 The name of the repository to search.
91 endpoint (str):
92 The endpoint for the resource. For example, issues. This means we'd be
93 making a request to https://api.github.com/repos/{github_org}/{repo}/issues.
94 payload (dict):
95 The payload to post.
96
97 Returns:
98 requests.models.Response
99 """
100 url = self._construct_url(github_org, repo, endpoint)
101 return requests.post(url, headers=self.headers, json=payload)

Callers 2

_post_commentFunction · 0.80
queryMethod · 0.80

Calls 1

_construct_urlMethod · 0.95

Tested by

no test coverage detected