decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

Manage any PR with editable content through editorial workflow

Open erquhart opened this issue 5 years ago • 3 comments

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:

  • existing projects that add the CMS
  • projects that want to publish non-CMS changes together with content changes
  • teams that want to use some mix of Git, GitHub, and the CMS in their workflow

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

  • Adding or removing entries to/from an editorial workflow branch through the CMS UI (#1025)
  • Naming or editing in any way the entry group itself in the CMS (probably named via PR title)

erquhart avatar Dec 18 '19 01:12 erquhart