Ben Chuanlong Du's Blog

It is never too late to learn.

Delete a Repository Secret Using GitHub Rest API

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

In [ ]:
import requests

token = "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
In [ ]:
requests.delete(
    url="https://api.github.com/repos/legendu-net/docker-jupyterhub/actions/secrets/GITHUBACTIONS",
    headers={"Authorization": f"token {token}"},
)
<Response [204]>
In [ ]:

Comments