merge with -s ours


I open up a pull request and merge it into a protected branch. Then an automatization starts and opens up a pull request to the next protected branch with the changes from the first pull request - but i do not want to merge the changes in the second branch, i want to make an merge -s ours.

Background is: I am writting a java-application wich opens up a new pull request with the changes from the old one and merge it to another protected branch. But in some cases i do not want to have the commits from the pull request in a branch and want to make a merge -s ours. So that the commits are not “open” anymore and the branch stays as it is.

I am using: for all the others tasks in java.

But i could not find anything in this api that could do that.

So my question is is it generally possible via the “normal” GitHub api?

Or is there any other java library that can do this?

Thank you!