What are the status tags, like [build | passing]

Mayeenul Islam picture Mayeenul Islam · Feb 22, 2016 · Viewed 10.1k times · Source

May be a well known question, but actually I'm asking this, because I'm not familiar with these tags.

status tags

I've seen similar types of tags in various Github projects, especially in their README.md. My questions are manifold regarding these:

  1. What's the purpose of these tags?
  2. How to generate them?
  3. Is there any good practice or documentation that suggests what types of tags can be used or should be used in a project?
  4. When a project can be determined viable using such a tag?

Answer

Chris picture Chris · Feb 23, 2016

What's the purpose of these tags?

These images are provided by external services, often continuous integration services, and are used to show interesting information about the repository.

For example, the first badge you show in your example says that the build is "passing" (the exact definition of this will be build-specific, but it commonly means that the tests pass and nothing blew up during the most recent build).

The third example, coverage: 12%, is a code coverage report.

How to generate them?

Each service will have its own way.

The second badge in your example is from Scrutinizer, and unfortunately I can't find documentation about its badges. But most badging systems work by giving you a link for each project or job that you can use on your website or GitHub or whatever, and when a build happens the badge's appearance is updated accordingly.

The Travis CI documentation contains a good example.

Having answered the first to questions, I think your last two largely disappear. The badges that can be used are determined by whatever services you can find. The badges that should be used are entirely up to you.