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

Publishing silently fails and closes PR when repo has required reviews enabled #1019

Closed
verythorough opened this issue Jan 17, 2018 · 1 comment · Fixed by #1016
Closed

Comments

@verythorough
Copy link
Contributor

- Do you want to request a feature or report a bug?
bug

- What is the current behavior?
If the publish branch is a protected branch on GitHub, with required reviews enabled, clicking the publish button in the CMS will silently fail, close the PR, and delete the branch, unless the user has the ability to dismiss the review requirement.

The netlify-cms repo happens to be a repo that works like this. Required reviews are enabled, but admin users (not write-permitted users) can override and merge without review. The config for netlifycms.org/admin uses the github backend, so users log in with their own GitHub accounts.

If a write-only collaborator (like @tech4him1, who took the screenshot below) tries to publish a change, GitHub sends the following response:
capture
The CMS ignores the response, assumes success, and deletes the branch and closes the PR.

If a repo admin (like me; I took the next screenshot) tries to publish, everything works as normal:
screen shot 2018-01-16 at 5 22 52 pm

- What is the expected behavior?
When branch protections are in place and the user (or git-gateway user token) doesn't have permission to override them, the CMS should leave the PR and branch as they are, and display a relevant error message.

- Please link or paste your config.yml below if applicable.
See https://github.com/netlify/netlify-cms/blob/master/website/site/static/admin/config.yml 😉

@tech4him1
Copy link
Contributor

Screenshot showing request methods and response codes:
cms failure

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

Successfully merging a pull request may close this issue.

2 participants