curl -u "$your_username" https://api.github.com/repos/$repo_owner/$repo_name
$your_usernameis well your GitHub username for authentication.
$repo_owneris the owner of the repo e.g. badgen.
$repo_nameis the name of the repo e.g. badgen-icons.
You will need to have read permissions for the repo for this to work, and once entering the command you will be prompted to provide a password for your GitHub account. If you use 2 factor authentication use one of the following 2 methods:
Pass a 2 factor authentication code
curl -u "$your_username" --header 'x-github-otp: $2fa_code' https://api.github.com/repos/$repo_owner/$repo_name
$2fa_codeis the 2 factor authentication code from your phone.
Pass a personal access token
curl --header 'Authorization: token $pat_token' https://api.github.com/repos/$repo_owner/$repo_name
$pat_tokenis a personal authentication token (see this article).
Running one of the above curl commands should output a large JSON object of all the repository details, all we want is the "id" field, it should be the first item and be a 9 digit number.
Once you have found the id for your repo, you can use it with the badgen dependabot endpoint like so: