Is there a way to fetch only active branches from Octokit::Client?

35 Views Asked by At

I am trying to retrieve some branches from repository which starts with "xyz-", upon reading the documentation I figured out that there's no way to apply name filter and I need to fetch all of the branches first then apply filter to them.

So I wrote something like this

Client.autoload = true
branches = Client.branches(REPO_PATH)
filter(branches)

Now the problem is this is returning all of the branches we have almost around 6000+ which active branches are only 200 something

Is there any way to only fetch the active branches? Or apply some created_at filter?

I've read the documentation was not able to find anything related to this, so does anyone know a hacky solution for this

0

There are 0 best solutions below