If you're working on a protected branch, you won't be able to make irrevocable changes to the branch. You can enable required status checks on the protected branch that will prevent you from merging the pull request until all of the required checks pass. You can also enable required pull request reviews on the protected branch that will prevent you from merging the pull request until it's been approved.

You can see if your pull request can be merged at the bottom of the pull request's Conversation tab.

  • If you're working on a branch with protections enabled by a repository administrator, you won't be able to delete or force push to the branch.
  • If the protected branch has required status checks enabled, you won't be able to merge changes into the branch until all of the required CI tests pass.
  • If the protected branch has required pull request reviews enabled, you won't be able to merge changes into the branch until the pull request review policy has been approved.

    Note: If you're a repository owner or administrator, you can merge pull requests on branches that have required pull request reviews enabled even if the pull request hasn't been approved.

Merge pull request

Further reading