Customizing Commit Messages #16

Merged
merged 1 commit into from Jan 8, 2014

Conversation

Projects
None yet
2 participants
@rmm5t
Member

rmm5t commented Dec 19, 2013

I've been experimenting with different continuous integration/deployment services lately. Not all are smart enough to skip builds on the gh-pages branch (specifically, I'm talking about Codeship), but one way around this is to add a message like "--skip-ci" or "[skip ci]" to the commit message to avoid the build.

So, what I'd like to suggest is an ability to customize the commit message that gets pushed to the gh-pages branch. I'm happy to code this up, but I wanted to get some buy-in for this feature first. I'm also looking for some guidance of how you'd like this implemented, because there are several ways to potentially handle this.

  1. Allow a message argument to add a suffix to the publish task's commit message (meh)
  2. Allow for an env variable to specify a suffix for the commit message (easy)
  3. Build in some form of configurable commit message template (probably unnecessarily complex)
  4. Always add "[skip ci]" to commit messages (easy, but not exactly ideal and limiting)

Thoughts?

Added support for a commit message suffix
Using the COMMIT_MESSAGE_SUFFIX env var
@rmm5t

This comment has been minimized.

Show comment
Hide comment
@rmm5t

rmm5t Dec 19, 2013

Member

I actually needed some sort of behavior sooner than later, so i started experimenting with a couple branches. I decided to go with a custom env var to manage a commit message suffix. For example, here's how I'm deploying so that Codeship doesn't pick up and build the gh-pages branch upon publishing a new version of a site:

bundle exec rake publish COMMIT_MESSAGE_SUFFIX="--skip-ci"
Member

rmm5t commented Dec 19, 2013

I actually needed some sort of behavior sooner than later, so i started experimenting with a couple branches. I decided to go with a custom env var to manage a commit message suffix. For example, here's how I'm deploying so that Codeship doesn't pick up and build the gh-pages branch upon publishing a new version of a site:

bundle exec rake publish COMMIT_MESSAGE_SUFFIX="--skip-ci"
@rmm5t

This comment has been minimized.

Show comment
Hide comment
@rmm5t

rmm5t Dec 19, 2013

Member

For any future onlookers, I also just published a blog post about this topic and my underlying process of getting continuous deployment to work with middleman, middleman-gh-pages, and Codeship:

http://ryan.mcgeary.org/2013/12/19/continuous-integration-deployment-middleman-codeship-github-pages/

Member

rmm5t commented Dec 19, 2013

For any future onlookers, I also just published a blog post about this topic and my underlying process of getting continuous deployment to work with middleman, middleman-gh-pages, and Codeship:

http://ryan.mcgeary.org/2013/12/19/continuous-integration-deployment-middleman-codeship-github-pages/

@rmm5t

This comment has been minimized.

Show comment
Hide comment
@rmm5t

rmm5t Jan 7, 2014

Member

@adamlogic What do you think of this pull-request? Any chance of getting it pulled in, and getting a version bump?

Member

rmm5t commented Jan 7, 2014

@adamlogic What do you think of this pull-request? Any chance of getting it pulled in, and getting a version bump?

@adamlogic adamlogic merged commit 912f90f into edgecase:master Jan 8, 2014

@rmm5t rmm5t deleted the rmm5t:commit-message-suffix branch Jan 8, 2014

@adamlogic

This comment has been minimized.

Show comment
Hide comment
@adamlogic

adamlogic Jan 8, 2014

Member

@rmm5t Sorry I've been slacking on these PRs. I'm no longer actively maintaining any Middleman sites, so before I bump the version, can you make sure the master branch is working for you?

Member

adamlogic commented Jan 8, 2014

@rmm5t Sorry I've been slacking on these PRs. I'm no longer actively maintaining any Middleman sites, so before I bump the version, can you make sure the master branch is working for you?

@rmm5t rmm5t restored the rmm5t:commit-message-suffix branch Jan 8, 2014

@rmm5t

This comment has been minimized.

Show comment
Hide comment
@rmm5t

rmm5t Jan 8, 2014

Member

@adamlogic Just tested. Master branch works great. Thanks! A version bump would be awesome.

Member

rmm5t commented Jan 8, 2014

@adamlogic Just tested. Master branch works great. Thanks! A version bump would be awesome.

@rmm5t

This comment has been minimized.

Show comment
Hide comment
@rmm5t

rmm5t Jan 8, 2014

Member

@adamlogic Also, if you're looking for help maintaining this gem, I'd be glad to help. I help out with several different projects when I can. If you want to add me to this repository and give me gem push rights, I'd be glad to help out. Not that I think this gem needs much change, but I use this gem on several projects and have a vested interest.

Either way. Just throwing that out there.

Member

rmm5t commented Jan 8, 2014

@adamlogic Also, if you're looking for help maintaining this gem, I'd be glad to help. I help out with several different projects when I can. If you want to add me to this repository and give me gem push rights, I'd be glad to help out. Not that I think this gem needs much change, but I use this gem on several projects and have a vested interest.

Either way. Just throwing that out there.

@adamlogic

This comment has been minimized.

Show comment
Hide comment
@adamlogic

adamlogic Jan 8, 2014

Member

@rmm5t Offer accepted! You should have commit access now. Thanks so much for helping out!

Member

adamlogic commented Jan 8, 2014

@rmm5t Offer accepted! You should have commit access now. Thanks so much for helping out!

@rmm5t rmm5t deleted the rmm5t:commit-message-suffix branch Feb 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment