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

Method add_to_labels

github/Issue.py:403–409  ·  view source on GitHub ↗

:calls: `POST /repos/{owner}/{repo}/issues/{issue_number}/labels `_

(self, *labels: Label | str)

Source from the content-addressed store, hash-verified

401 self._set_complete()
402
403 def add_to_labels(self, *labels: Label | str) -> None:
404 """
405 :calls: `POST /repos/{owner}/{repo}/issues/{issue_number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
406 """
407 assert all(isinstance(element, (github.Label.Label, str)) for element in labels), labels
408 post_parameters = [label.name if isinstance(label, github.Label.Label) else label for label in labels]
409 headers, data = self._requester.requestJsonAndCheck("POST", f"{self.url}/labels", input=post_parameters)
410
411 def create_comment(self, body: str) -> IssueComment:
412 """

Calls 1

requestJsonAndCheckMethod · 0.80

Tested by

no test coverage detected