MCPcopy
hub / github.com/PyGithub/PyGithub / edit

Method edit

github/GistComment.py:125–135  ·  view source on GitHub ↗

:calls: `PATCH /gists/{gist_id}/comments/{comment_id} `_

(self, body: str)

Source from the content-addressed store, hash-verified

123 headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
124
125 def edit(self, body: str) -> None:
126 """
127 :calls: `PATCH /gists/{gist_id}/comments/{comment_id} <https://docs.github.com/en/rest/reference/gists#comments>`_
128 """
129 assert isinstance(body, str), body
130 post_parameters = {
131 "body": body,
132 }
133 headers, data = self._requester.requestJsonAndCheck("PATCH", self.url, input=post_parameters)
134 self._useAttributes(data)
135 self._set_complete()
136
137 def _useAttributes(self, attributes: dict[str, Any]) -> None:
138 if "author_association" in attributes: # pragma no branch

Callers

nothing calls this directly

Calls 3

_useAttributesMethod · 0.95
requestJsonAndCheckMethod · 0.80
_set_completeMethod · 0.80

Tested by

no test coverage detected