Add squash merges option for editorial workflow (#1330)

This commit is contained in:
Chris Swithinbank
2018-05-14 17:46:37 +02:00
committed by Shawn Erquhart
parent 70ec10feab
commit 04087026dd
6 changed files with 19 additions and 3 deletions

View File

@ -77,3 +77,14 @@ import styles from '!css-loader!sass-loader!../main.scss'
CMS.registerPreviewStyle(styles.toString(), { raw: true })
```
## Squash merge GitHub pull requests
When using the [Editorial Workflow](/docs/configuration-options/#publish-mode) with the `github` or `git-gateway` backends, Netlify 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 `config.yml`:
```yaml
backend:
squash_merges: true
```