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

Method remove_seats

github/Copilot.py:79–92  ·  view source on GitHub ↗

:calls: `DELETE /orgs/{org}/copilot/billing/selected_users `_ :param selected_usernames: List of usernames to remove Copilot seats for :rtype: int :return: Number of seats cancelled

(self, selected_usernames: list[str])

Source from the content-addressed store, hash-verified

77 return data["seats_created"]
78
79 def remove_seats(self, selected_usernames: list[str]) -> int:
80 """
81 :calls: `DELETE /orgs/{org}/copilot/billing/selected_users <https://docs.github.com/en/rest/copilot/copilot-business>`_
82 :param selected_usernames: List of usernames to remove Copilot seats for
83 :rtype: int
84 :return: Number of seats cancelled
85 """
86 url = f"/orgs/{self._org_name.value}/copilot/billing/selected_users"
87 _, data = self._requester.requestJsonAndCheck(
88 "DELETE",
89 url,
90 input={"selected_usernames": selected_usernames},
91 )
92 return data["seats_cancelled"]
93
94 def _useAttributes(self, attributes: dict[str, Any]) -> None:
95 if "org_name" in attributes: # pragma no branch

Callers 1

testRemoveSeatsMethod · 0.80

Calls 1

requestJsonAndCheckMethod · 0.80

Tested by

no test coverage detected