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

Method edit

github/Milestone.py:183–205  ·  view source on GitHub ↗

:calls: `PATCH /repos/{owner}/{repo}/milestones/{milestone_number} `_

(
        self, title: str, state: Opt[str] = NotSet, description: Opt[str] = NotSet, due_on: Opt[date] = NotSet
    )

Source from the content-addressed store, hash-verified

181 headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
182
183 def edit(
184 self, title: str, state: Opt[str] = NotSet, description: Opt[str] = NotSet, due_on: Opt[date] = NotSet
185 ) -> None:
186 """
187 :calls: `PATCH /repos/{owner}/{repo}/milestones/{milestone_number} <https://docs.github.com/en/rest/reference/issues#milestones>`_
188 """
189 assert isinstance(title, str), title
190 assert state is NotSet or isinstance(state, str), state
191 assert description is NotSet or isinstance(description, str), description
192 assert due_on is NotSet or isinstance(due_on, date), due_on
193 post_parameters = NotSet.remove_unset_items(
194 {
195 "title": title,
196 "state": state,
197 "description": description,
198 }
199 )
200
201 if is_defined(due_on):
202 post_parameters["due_on"] = due_on.strftime("%Y-%m-%d")
203
204 headers, data = self._requester.requestJsonAndCheck("PATCH", self.url, input=post_parameters)
205 self._useAttributes(data)
206
207 def get_labels(self) -> PaginatedList[github.Label.Label]:
208 """

Callers

nothing calls this directly

Calls 4

_useAttributesMethod · 0.95
is_definedFunction · 0.90
remove_unset_itemsMethod · 0.80
requestJsonAndCheckMethod · 0.80

Tested by

no test coverage detected