Better Github Labels
If you’re using Github to manage your code base you’re probably also using the issues feature and using labels to keep track of the type of issue that has been brought up.
I want to share what Github labels I use throughout pretty much all projects and how to easily implement them into Github without using any kind of tool, just simply using the console.
Label Names
There are three main types of labels that I use status, type and priority. There is also a fourth I will sometimes use which is for, this is when there is more than one purpose in the code base e.g. marketing pages and an app behind a login (of course this could come under type but I like to use it for the extra specificity).
Here are the label names that I use:
Adding Labels to Github via Console
I know there are packages out there that will auto add labels to Github for you but I wanted to share a different way of doing it via the console.
- Go on your labels page (https://github.com/user/repo/labels)
- Open up dev tools, go to the console, paste the code below and hit enter:
Using Github Labels from a Different Repo?
Maybe you already have a repo with some great labels already and want to use them in a different project your working on? We can do that via the console too.
- Go on your labels page (https://github.com/user/repo/labels)
- Open up dev tools, go to the console, paste the code below and hit enter:
- Copy the output and now you can import it using the first example.
I hope that this little tutorial on making better Github labels and how to implement them was helpful to you. I would love to know what labels you use in your projects!
I want to give shout outs to a few people that gave me a lot of inspiration for this article:
- Dave Lunny for his article about Sane Github Labels.
- Chang-Hsi Hsieh for his import of labels code.
- Maxime Thirouin for his export of labels code.