By default, saving a post in the CMS interface pushes a commit directly to the publication branch specified in
backend. However, you also have the option to edit the Publish Mode, which adds an interface for drafting, reviewing, and approving posts. To do this, add the following line to your Decap CMS
# This line should *not* be indented
From a technical perspective, the workflow translates editor UI actions into common Git commands:
|Actions in Netlify UI
|Perform these Git actions
|Commits to a new branch (named according to the pattern
cms/collectionName/entrySlug), and opens a pull request
|Pushes another commit to the draft branch/pull request
|Approve and publish draft
|Merges pull request and deletes branch
In order to track unpublished entries statuses the Bitbucket implementation uses pull requests comments.
In order to track unpublished entries statuses the GitLab implementation uses merge requests labels.
When using the Editorial Workflow with the
github or GitHub-connected
git-gateway backends, Decap CMS creates a pull request for each unpublished entry. Every time the unpublished entry is changed and saved, a new commit is added to the pull request. When the entry is published, the pull request is merged, and all of those commits are added to your project commit history in a merge commit.
The squash merge option causes all commits to be "squashed" into a single commit when the pull request is merged, and the resulting commit is rebased onto the target branch, avoiding the merge commit altogether.
To enable this feature, you can set the following option in your Decap CMS