MCPcopy
hub / github.com/PyGithub/PyGithub / mark_ready_for_review

Method mark_ready_for_review

github/PullRequest.py:1036–1059  ·  view source on GitHub ↗

:calls: `POST /graphql `_ to mark pull request ready for review

(
        self,
        client_mutation_id: Opt[str] = NotSet,
    )

Source from the content-addressed store, hash-verified

1034 return data
1035
1036 def mark_ready_for_review(
1037 self,
1038 client_mutation_id: Opt[str] = NotSet,
1039 ) -> dict[str, Any]:
1040 """
1041 :calls: `POST /graphql <https://docs.github.com/en/graphql>`_ to mark pull request ready for review
1042 <https://docs.github.com/en/graphql/reference/mutations#markpullrequestreadyforreview>
1043 """
1044 assert is_optional(client_mutation_id, str), client_mutation_id
1045
1046 # Define the variables
1047 variables = {
1048 "pullRequestId": self.node_id,
1049 "clientMutationId": client_mutation_id,
1050 }
1051
1052 # Make the request
1053 _, data = self._requester.graphql_named_mutation(
1054 mutation_name="markPullRequestReadyForReview",
1055 mutation_input=NotSet.remove_unset_items(variables),
1056 output_schema="clientMutationId pullRequest { isDraft }",
1057 )
1058 self._useAttributes({"draft": data["pullRequest"]["isDraft"]})
1059 return data
1060
1061 def _useAttributes(self, attributes: dict[str, Any]) -> None:
1062 if "_links" in attributes: # pragma no branch

Callers 1

Calls 4

_useAttributesMethod · 0.95
is_optionalFunction · 0.90
remove_unset_itemsMethod · 0.80

Tested by

no test coverage detected