How to set dependabot merge to restricted branch

We set our repos to allow merge to staging only when PR is approved and we restricted who can push to staging.

After approval I instruct dependabot to merge its PR by commenting @dependabot merge I receive this error message:

You're not authorized to push to this branch. Visit for more information.

I’ve seen several questions about automerge but this questions is not about automerge. I would like to manually issue a merge command just like described here

In they suggest granting push to branch privilege to dependabot-preview user. That user only came up when I connected dependabot .com to the repo. But even after I still got the same error as above. I assume dependabot-preview` is not the native github dependabot.

My use case is exactly as said by others:

I have a bunch of open PRs, and I give explicit approval to them, I don’t want to spend a few hours going back, merging in master, waiting for CI to pass, and pressing the merge button.

1 Like

Dependabot will not be able to merge to this restricted branch.