Closes the advisory. :calls: `PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} `
(self)
| 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 |
nothing calls this directly
no test coverage detected