-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add squash merges option for editorial workflow #1330
Changes from 12 commits
324b7fc
a25056b
0a39422
12f409d
7dcb7e9
0598c72
db27590
93d20cc
94ed858
c6ab176
94964b8
e8bc69c
1e379e9
48c1b2f
b644032
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,3 +77,10 @@ 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 publish mode](/docs/configuration-options/#publish-mode) with the `github` or `git-gateway` backends, Netlify CMS creates pull requests to hold drafts while they are being edited and then merges them into your main branch when you press publish. By default, these are merged preserving the history of all the individual commits (i.e. changes where you pressed save). If instead you would like [“squash”](https://help.github.com/articles/about-pull-request-merges/#squash-and-merge-your-pull-request-commits) these commits, reducing clutter in your repository’s history, you can set the following option in your `config.yml`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great description! The one suggestion I would make is to simplify the second-to-last sentence. Parentheticals and Latin abbreviations like i.e. can be difficult for translators, etc. I suggest ending the sentence after "individual commits" and changing the parenthetical to a sentence, like:
I would also suggest adding a paragraph break before the last sentence ("If instead..."). |
||
|
||
```yaml | ||
backend: | ||
squash_merges: true | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave this out, trying to avoid validation of beta features, plus this is specific to one backend. After 2.0 I expect we'll provide a way for specific backends to validate their configuration, as a similar effort is underway for widgets.