GraphQL API - Require Linear history


I’m working with GraphQL API and branch protection rules at the moment.
Everything works pretty well, except one checkbox: Require linear history.

Could you please advise if there’s a way to programmatically enable/disable it via GraphQL API? I couldn’t find anything. If not, could you tell me if there is an estimated time to add this parameter?

I know it exists for GitHub REST API, which requires branch name as an input parameter, but at the time of creating the rules branch doesn’t exist, so it’s impossible to enable this checkbox as well.

Many thanks,

Hi @burningalchemist / Sergei,

Unfortunately, there is no GraphQL endpoint to control the linear history requirement, even still. Since this is likely something you’re still hoping to see, I would highly recommend submitting this suggestion, here:

…and keeping an eye on our public roadmap, here:

But for now, I can only offer you disappointment :cry: