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

Customizing Commit Messages #16

Merged
merged 1 commit into from Jan 8, 2014

Conversation

rmm5t
Copy link
Member

@rmm5t 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?

Using the COMMIT_MESSAGE_SUFFIX env var
@rmm5t
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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 commit-message-suffix branch January 8, 2014 15:06
@adamlogic
Copy link
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?

@rmm5t rmm5t restored the commit-message-suffix branch January 8, 2014 15:07
@rmm5t
Copy link
Member Author

rmm5t commented Jan 8, 2014

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

@rmm5t
Copy link
Member Author

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
Copy link
Member

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

@rmm5t rmm5t deleted the commit-message-suffix branch February 16, 2016 02:19
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

Successfully merging this pull request may close these issues.

None yet

2 participants