Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Push to Protected Branch with WIP Status Check Enabled #770

Open
vicentepdj opened this issue Jan 7, 2025 · 0 comments
Open

Comments

@vicentepdj
Copy link

vicentepdj commented Jan 7, 2025

I am encountering an issue where I am unable to push to a protected branch (dev) in my repository when the WIP status check is enabled. The commit message does not include "WIP", but I still receive an error indicating that the branch update failed due to the WIP status check.
The user (user1) has write privileges and the protection rule is configured so that this user is able to push to this branch even though is protected for the rest of the users.

Steps to Reproduce:

  1. Configure branch protection rules with the following options checked:
    1.1 Required a pull request before merging
    1.2 Require approvals (1)
    1.3 Restrict who can dismiss pull request reviews -> (user1)
    1.4 Allow specified actors to bypass required pull request -> (user1)
    1.5 Require status checks to pass before merging (WIP)
    1.6 Require approval of the most recent reviewable push
    1.7 Require linear history
    1.8 Restrict who can push to matching branches -> (user1)
  2. Ensure the commit message does not contain "WIP".
  3. Attempt to push changes directly to the dev branch.

Expected Behavior: The push should succeed if the commit message does not contain "WIP".

Actual Behavior: The push fails with the following error message:

remote: error: GH006: Protected branch update failed for refs/heads/dev.
remote: 
remote: - Changes must be made through a pull request.
remote: 
remote: - Required status check "WIP" is expected.

If I disable the check e I can push directly to the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant