Collection: Build Badges
Badges on source code repositories are important to first-time users. In today's collection, I focus on using build badges along with ways to get started
On a developer's journey, your skills grow from building your first application with code check-in to creating unit tests and deploying your application using DevOps.
DevOps gives developers the ability to off-load certain tasks to let the system build the code for you and, optionally, deploy it to certain environments automatically. This is called Continuous Integration/Continuous Delivery, or CI/CD.
Every task added to a DevOps pipeline is meant to automate what developers experience when building software. This includes building the software, running unit tests, pushing a completed build to an environment (dev, QA/staging, or Prod), or even creating release notes.
After your build completes and more codebases become public, users of the codebase sometimes want to know the status of an open-source project.
Did it complete? Is it unit tested? Is it still compiling/building?
This is where badges come into play.
Badges fall into two categories: dynamic and static.
- Dynamic - These convey a state to your users whether a build or unit tests completed successfully.
- Static - Lets the user know the type of licensing for your projects, the language it uses, or can be just a fun little badge for entertainment purposes.
Whether dynamic or static, they are extremely easy to use in your repositories.
How to Use Badges
Badges are easy to include in any source code repository. Usually, they are available on the README page when visiting a GitHub repository.
Also, each badge in this list has their own installation method. You may need to register for a key or follow additional instructions to make it work.
Honestly, it's simply a snippet of either markdown, HTML, or image URL you copy-and-paste into your README document.
For example, if you want to display the size of your GitHub repository:
Place an image into your markdown pointing to this image file (taken from shields.io).
The image URL will call the server and automatically generate the image related to the repository.
Follow the badge instructions on how to include them in your README, but don't go crazy. I've seen "badge saturation" on a couple repositories. Only include the relevant and important information for each repository.
The list below may be small (only 5), but as with every collection, I like to grow each collection with user contributions on their favorite to make the collection more valuable.
The majority of badges I've seen around the Internet come from shields.io mainly because of their large catalog of badges.
This is a great place to start.
They even have a way for you to build your own badges.
There are references to Shields.IO in here, but there are a couple not related that I thought would be useful as well.
If you're looking for a snazzy badge for your Github profile page, check out ShadyNagy's profile page. Everyone has a README on their profile and what better way to let everyone know what kind of repositories and languages you support.
His README is here in raw form.
If you'd like to manage your own profile page, Github provides a guide on how to create a profile README.
Of course, I had to mention "a collection in my collection."
BadGen is another service to create your own badges based on URL. Quite extensive as well.
With all of the repositories out there, badges allow first-time users to get a "dashboard" view of your project based on the badges.
What kind of license is it? Is it broken? Is there a community behind this project? It's something you want to convey to users as a professional developer.
Again, I want to grow this list. If you have a favorite badge site not listed here, let me know and I'll add it to the collection.
- Build Badges
- Collection: Coronavirus (COVID-19)
- Collection: Remote Work
- Collection: Real-world Refactoring
- Collection: How to be a Great Developer
- Collection: Architect References
- Collection: Inspiration/Motivation
- Collection: Blockchain
- Collection: SQL Server Sample Databases
- Collection: Beginner Tutorials for ASP.NET MVC
- Collection: GitHub Resources for Beginners
- Collection: Cloud Design Patterns and Practices
- Collection: CSS Resources
- Collection: Docker
- Collection: Web API Best Practices