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

Upload images as part of editorial workflow #2397

Closed
wants to merge 7 commits into from

Conversation

s0
Copy link
Contributor

@s0 s0 commented Jun 21, 2019

This pull request is still a bit of a work-in-progress, but I wanted to open a PR here to start a discussion on what needs to be done before we can get this merged in.

This Addresses issue #1344 by allowing users to upload images as part of an editorial workflow, which adds the images to the same branch as collection content, allowing for a couple of things:

  • The default branch of the repo can be protected (e.g. only certain people approved to merge, require status checks before merge).
  • Images can be made part of the review process in addition to the entry content.

This has currently only been tested with GitHub, it probably doesn't work on other backends at the moment, this will need to be tested first. It's based on the work of @ro-savage in Encrypt-S@a86b5e8, but has been rebased ontop of the latest code, and cleaned up a little bit.

Later on down the line, if the editorial workflow is updated to be compatible with fork-and-pr workflows on GitHub, these changes should automatically work there too.

@netlify
Copy link

netlify bot commented Jun 21, 2019

Preview proposed changes to the CMS demo site in the link below:

Built with commit e56e35c

https://deploy-preview-2397--cms-demo.netlify.com

@netlify
Copy link

netlify bot commented Jun 21, 2019

Preview proposed changes to netlifycms.org in the link below:

Built with commit e56e35c

https://deploy-preview-2397--netlify-cms-www.netlify.com

@wakeless
Copy link

Hey @samlanning thanks for your hard work on this one, looks certainly like something that we want to use (uploading images as part of the PR as we don't allow commits direct to master)

I've straight away run into a problem wherein it looks like I've accidentally changed my PR into a mediaOnlyPr and now I can't see it in the editorial workflow or edit it :( I think I did this because I did a image uploader upload.

@erquhart
Copy link
Contributor

@samlanning any thoughts on what @wakeless ran into?

@s0
Copy link
Contributor Author

s0 commented Aug 16, 2019

Sorry for not replying to this sooner.

Yeah that makes sense, I think the best way to solve for this would probably be to only allow media to be uploaded once a draft post has been "saved", and a PR opened, then using that existing PR.

@stale
Copy link

stale bot commented Oct 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 29, 2019
@stale stale bot removed the wontfix label Oct 29, 2019
@erezrokah
Copy link
Contributor

Closing this as I'm working on the same issue #1344.
My initial commit is here: 94934c2

I'm taking a slightly different approach of linking the media file to the draft entry and persisting everything together on save. It is still WIP though

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

Successfully merging this pull request may close these issues.

5 participants