decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.96k stars 3.05k forks source link

Manage any PR with editable content through editorial workflow #2977

Open erquhart opened 4 years ago

erquhart commented 4 years ago

tl;dr

The editorial workflow should display any PR that changes a file that CMS is configured to edit, even if there are multiple such files and/or files that the CMS is not configured to edit.

Context

This issue coincides with #1669 (probably a prerequisite) and provides groundwork for #192 and #1025.

Also satisfies #2236.

Problem

The editorial workflow can only surface pull requests created by the CMS, and only deals reliably with pull requests that consist entirely of CMS created commits. This is not great for:

Solution

Pull in any pull request and infer all necessary info, Eg. which collection an entry belongs to. Make the workflow trivial to opt in/out of per pull request.

Proposed changes

  1. Pull requests can be filtered by checking for changes to a file whose path matches the configuration for a collection.
  2. Pull requests that have not already been interacted with by the CMS would appear in a separate column or location in the workflow.
  3. Leaning on #1669, an isomorphic control such as GitHub's labels would be used to indicate pull requests that are actively in the workflow.
  4. Removing the isomorphic control would cause the PR to show in the area with PR's that are not active for the CMS, and may be reactivated
  5. Editorial workflow branches with multiple CMS entry files will show those files, and each can be edited.
  6. Publishing can be optionally disabled specifically for workflow branches that include changes to files that the CMS cannot edit, such as source code

Out of scope

joshdcomp commented 4 years ago

It would be helpful if branch switching could be introduced agnostic of the editorial workflow given that EW is exclusive to GitHub. I outlined a use-cases in #2964

erquhart commented 4 years ago

@joshdcomp we're working on adding editorial workflow support for GitLab and Bitbucket now 👍

martinjagodic commented 3 months ago

Just found this issue, this would be a huge feature! But also a huge workload :D Let's keep this in the backlog...