diff --git a/github/Artifact.py b/github/Artifact.py index 018e8e5cbd..741bfea04d 100644 --- a/github/Artifact.py +++ b/github/Artifact.py @@ -116,6 +116,14 @@ def workflow_run(self): """ return self._workflow_run.value + def delete(self) -> bool: + """ + :calls: `DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id} `_ + :rtype: bool + """ + status, headers, data = self._requester.requestBlob("DELETE", self.url) + return status == 204 + def _initAttributes(self): self._archive_download_url = github.GithubObject.NotSet self._created_at = github.GithubObject.NotSet diff --git a/github/Artifact.pyi b/github/Artifact.pyi index 9a0c41fcaa..04a5476704 100644 --- a/github/Artifact.pyi +++ b/github/Artifact.pyi @@ -6,6 +6,7 @@ class Artifact(github.GithubObject.NonCompletableGithubObject): def archive_download_url(self) -> str: ... @property def created_at(self) -> datetime: ... + def delete(self) -> bool: ... @property def expired(self) -> bool: ... @property