I am trying to configure a GitHub repo so only certain users can push to a certain branch.
The branch pattern name matches the branch I want to restrict.
Here is a screen shot of the protected branch settings:
Yet, I can still can create a pull request from any branch and merge to the protected branch.
This is an organizational repo which I have admin privileges. Can only an organization maintainer change a branch's protected settings? Is there something else that needs to be configured?
I think this is by design. The "restrict who can push to matching branches" feature limits who can push to a branch, but you say
Yet, I can still can create a pull request from any branch and merge to the protected branch.
The whole point of protecting branches is to force code to go through a pull request process. Restricting push access doesn't restrict pull requests. It simply means users can't git push
code directly to the branch.
You can also add required status checks before pull requests can be merged, e.g. for tests to pass, for a certain number of collaborators to approve the pull request, for commits to be cryptographically signed, etc.