GET default branch

I didn’t see this in the documentation - is there an endpoint I can hit to get the default branch? Some of our projects don’t use master as the default so I need to see which branch is being used as the default.

Do you mean the default branch in your Git repo? I wonder if you could get that from your repo host rather than from your CI.

Not sure why you need to do this but I found the info for you.

I need to deal with 14 github repos at work, so if someone changes the default github branches without my consent, I will not be happy. :slight_smile: My CI/CD workflow will fail.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.