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

Method close

github/RepositoryAdvisory.py:368–381  ·  view source on GitHub ↗

Closes the advisory. :calls: `PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} `

(self)

Source from the content-addressed store, hash-verified

366 )
367
368 def close(self) -> None:
369 """
370 Closes the advisory.
371
372 :calls: `PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} <https://docs.github.com/en/rest/security-advisories/repository-advisories>`
373
374 """
375 patch_parameters = {"state": "closed"}
376 headers, data = self._requester.requestJsonAndCheck(
377 "PATCH",
378 self.url,
379 input=patch_parameters,
380 )
381 self._useAttributes(data)
382
383 def _useAttributes(self, attributes: dict[str, Any]) -> None:
384 if "author" in attributes: # pragma no branch

Callers

nothing calls this directly

Calls 2

_useAttributesMethod · 0.95
requestJsonAndCheckMethod · 0.80

Tested by

no test coverage detected