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

Method edit

github/PullRequest.py:613–635  ·  view source on GitHub ↗

:calls: `PATCH /repos/{owner}/{repo}/pulls/{pull_number} `_

(
        self,
        title: Opt[str] = NotSet,
        body: Opt[str] = NotSet,
        state: Opt[str] = NotSet,
        base: Opt[str] = NotSet,
        maintainer_can_modify: Opt[bool] = NotSet,
    )

Source from the content-addressed store, hash-verified

611 )
612
613 def edit(
614 self,
615 title: Opt[str] = NotSet,
616 body: Opt[str] = NotSet,
617 state: Opt[str] = NotSet,
618 base: Opt[str] = NotSet,
619 maintainer_can_modify: Opt[bool] = NotSet,
620 ) -> None:
621 """
622 :calls: `PATCH /repos/{owner}/{repo}/pulls/{pull_number} <https://docs.github.com/en/rest/reference/pulls>`_
623 """
624 assert is_optional(title, str), title
625 assert is_optional(body, str), body
626 assert is_optional(state, str), state
627 assert is_optional(base, str), base
628 assert is_optional(maintainer_can_modify, bool), maintainer_can_modify
629 post_parameters = NotSet.remove_unset_items(
630 {"title": title, "body": body, "state": state, "base": base, "maintainer_can_modify": maintainer_can_modify}
631 )
632
633 headers, data = self._requester.requestJsonAndCheck("PATCH", self.url, input=post_parameters)
634 self._useAttributes(data)
635 self._set_complete()
636
637 def get_comment(self, id: int) -> PullRequestComment:
638 """

Callers

nothing calls this directly

Calls 5

_useAttributesMethod · 0.95
is_optionalFunction · 0.90
remove_unset_itemsMethod · 0.80
requestJsonAndCheckMethod · 0.80
_set_completeMethod · 0.80

Tested by

no test coverage detected