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

Backend config 'branch' option does not work with git-gateway and editorial_workflow. #2502

Closed
gl2748 opened this issue Jul 26, 2019 · 2 comments

Comments

@gl2748
Copy link

gl2748 commented Jul 26, 2019

Describe the bug
The docs here: ' https://www.netlifycms.org/docs/authentication-backends/
show that branch is a config option for the backend config. However, when using the git-gateway backend with a branch specified like so:

backend:
  name: git-gateway
  branch: cms

You will find that setting the publish_mode setting to be:

backend:
  name: git-gateway
  branch: cms

publish_mode: editorial_workflow

Does not work, when you come to save a draft.

It does not work because as configured the CMS will pass a mal-formed ref like refs/heads/{backend-branch-config-here}/featureA to Github when saving draft content. It should be: refs/heads/featureA.

See:
https://developer.github.com/v3/git/refs/#create-a-reference

To Reproduce
See above.
Expected behavior
backend options should work for all backends.

@erquhart
Copy link
Contributor

It's not passing in the branch config, it uses cms/ as a prefix for branch names, and your branch config happens to be cms. I could have sworn we fixed this at some point, as having a branch named cms disallows our branch naming convention. I'll look for the related issue.

@erquhart
Copy link
Contributor

Yep, here it is: #2331 (comment)

Closing this is as a duplicate of that.

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

No branches or pull requests

2 participants