Utility to Find Gitlab Credit Usage
Through this article, we’re going to explore the GitLab CLI (glab) to help us query compute minutes consumed and remaining.
I created this helper script as I was iteratively making a lot of mistakes on my GitLab runners which was eating into my free 400 minutes that’s given when you sign up. I will now periodically run this to see how close I am and if I need to purchase additional credits.
Creating our own tools and helpers not only save us time in the long-run, but they do way more than that, they teach us more than we would have ever known about what’s available and give us incrementally acquired knowledge on many auxiliary tools and languages that we can flex throughout our careers.
Keeping Dependencies Current
Working on a project of almost any size will almost always require the use of external dependencies that can often put us in a position of alert fatigue where we might have to chase our projects for CVE’s that have been announced where it can feel like constantly plugging a dam. Using a technique to automate this chore which can be reviewed at a later date is extremely helpful.
There are widely available tools in the ecosystem, however; I’m presenting this as a fun exercise to demonstrate how we can get in touch with the machinery that we can implement to do this.