Skip to content
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

Use 'squash and merge' if possible when publishing posts #1328

Closed
ghost opened this issue Apr 29, 2018 · 2 comments
Closed

Use 'squash and merge' if possible when publishing posts #1328

ghost opened this issue Apr 29, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 29, 2018

I mentioned this in the Gitter chat and was told to write up an issue on this.

Current behavior:

When the CMS publishes a post, it merges the post behind the scenes. However the resulting commit history shows every single minor update done to the post, it keeps the entire commit history.

Suggested change in behavior:

The CMS should use the 'Squash and Merge' functionality instead when available.

Reasoning:

This would make sense for the CMS because when you publish a post, most people (at least I hope so) don't want to see the commit history of the post, it just creates a bunch of visual noise in the git log/commit history.

@delucis
Copy link
Contributor

delucis commented Apr 29, 2018

I’m working on a PR that would allow configuration of the merge_method passed to the GitHub API, which would allow you to set:

# config.yml
backend:
  merge_method: squash

Are there any opinions on implementation details? I have it defaulting to merge so it’s backwards-compatible, but I’m not doing any tests on the string to make sure it’s a valid value. Also, rebase merges don’t seem to make all that much sense in this context. Would it be more user friendly to have a Boolean option for squash merges instead?

backend:
  squash_merges: true

@ghost
Copy link
Author

ghost commented Apr 29, 2018

I have it defaulting to merge so it’s backwards-compatible

Good.

Also, rebase merges don’t seem to make all that much sense in this context. Would it be more user friendly to have a Boolean option for squash merges instead?

I agree with this, adding a third option just complicates things. Boolean makes things a lot less complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant