š„Letās Do DevOps: Get All GitHub Repo Branches (Even if thereās Thousands)
This blog series focuses on presenting complex DevOps projects as simple and approachable via plain language and lots of pictures. You can do it!
Hey all!
Iāve been writing an ongoing project Iām calling our GitHubCop ā itās a tool that iterates over every repo we have (and we have thousands) and sets all the settings, branch policies, permissions, etc. on each of them every day.
Iāve been primarily relying on GitHubās REST API + a lot of clever bash tricks. It isnāt the most modern language, but it makes sense to me, and heck, it works. As Iāve been developing the project Iāve found a few rough edges, and I wanted to write about one of them I stumbled on recently ā grabbing a list of ALL the branches in a repo.
After all, we only want to set branch policies for branches that exist, right? So letās talk about why this seemingly simple question isnāt simple, and how to solve it.
Iāve Moved To Lets Do DevOps
From here on out, all content will be published on Lets Do DevOps for free. I want to give back to the community as much as Iām able. Please subscribe there to avoid missing any content. Thanks all ā¤.
You can find this article here: