This is a generic guidline that applies mostly to Ruby on Rails and Postgres, but can be usefull for running any database migrations in CI.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'json' | |
require 'uri' | |
@token = '' | |
def list_files | |
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago | |
params = { | |
token: @token, |
- add
prepare-commit-msg
it to ./.git/hooks/ - Make it executable (chmod +x filename)
It should prepend [#STORY_ID]
into your commit message when the editor pops up.
Your branch must be in this format to work: branch-description-blabla-STORY_ID
it skips the prepaend if:
- The branch doesn't end in a story id (integer)
- The original commit message starts with "Merge"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Guardfile b/Guardfile | |
index 8382d1c..5009879 100644 | |
--- a/Guardfile | |
+++ b/Guardfile | |
@@ -9,16 +9,10 @@ guard 'spork', :cucumber => false, :rspec_env => { 'RAILS_ENV' => 'test' } do | |
watch('Gemfile') | |
watch('Gemfile.lock') | |
watch('spec/spec_helper.rb') { :rspec } | |
- watch(%r{features/support/}) { :cucumber } | |
- watch(%r{^app/models/.+\.rb$}) |