Hi,
I am trying to do some cleanup in some of our repo.
I have a protect branch rule with a simple wildcard mypbranch*
I can list the “real” branches underneath with GraphQL:
query { project(fullPath: <myproject_path>) {
id protectableBranches name } }
I got a list of strings, all is good.
Now I’d like to check how old they are and delete those older than x days
A GET against:
https://www.gitlab.com/api/v4/projects/<project_id>/repository/branches/mypbranch-1234
Is giving a 404 Can’t get info about branch mypbranch-1234
And same response with protected branches endpoint:
https://www.gitlab.com/api/v4/projects/<project_id>/repository/protected_branches/mypbranch-1234
Is there a way to achieve this?
Thanks.