MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / _hub

Method _hub

github/Repository.py:4156–4170  ·  view source on GitHub ↗
(self, mode: str, event: str, callback: str, secret: Opt[str])

Source from the content-addressed store, hash-verified

4154 return github.RepositoryPreferences.RepositoryPreferences(self._requester, headers, data)
4155
4156 def _hub(self, mode: str, event: str, callback: str, secret: Opt[str]) -> None:
4157 assert isinstance(mode, str), mode
4158 assert isinstance(event, str), event
4159 assert isinstance(callback, str), callback
4160 assert is_optional(secret, str), secret
4161 event = urllib.parse.quote(event, safe="")
4162
4163 post_parameters = collections.OrderedDict()
4164 post_parameters["hub.callback"] = callback
4165 post_parameters["hub.topic"] = f"https://github.com/{self.full_name}/events/{event}"
4166 post_parameters["hub.mode"] = mode
4167 if is_defined(secret):
4168 post_parameters["hub.secret"] = secret
4169
4170 headers, output = self._requester.requestMultipartAndCheck("POST", "/hub", input=post_parameters)
4171
4172 def get_release_asset(self, id: int) -> GitReleaseAsset:
4173 assert isinstance(id, int), id

Callers 2

subscribe_to_hubMethod · 0.95
unsubscribe_from_hubMethod · 0.95

Calls 3

is_optionalFunction · 0.90
is_definedFunction · 0.90

Tested by

no test coverage detected