Dependabot Badge

Public repositories

To enable dependabot on a public repo (for the badge to working), you need to either

Then you may include the badge in your repo like this PR.

Private repositories

In order to use the dependabot badge with a private GitHub repository you will need to get its id. You can use the GitHub API and curl to do this like so:

curl -u "$your_username" https://api.github.com/repos/$repo_owner/$repo_name

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:

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:

https://badgen.net/dependabot/badgen/example-private-repo/123456789?icon=dependabot

Examples

/dependabot/:owner/:repo/:identifier?