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
#!/usr/bin/env ruby | |
# parse Pivotal ticket names out of branches named similar to | |
# xxxx-9999-xxxx-xxxx | |
# make sure the hook has permissions to execute after copying it over | |
message_file = ARGV[0] | |
original_message = File.read(message_file) | |
# Don't do anything if the commit already has a pivotal id i.e. in the case of --amend | |
unless original_message.match(/\[\d+\]/) |
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
#!/usr/bin/env ruby | |
# parse jira ticket names out of branches named similar to | |
# project-9999-xxxx-xxxx | |
# project names in the branch can be lowercase | |
# branches do not have to begin with the project-9999; xxxx-project-9999-xxxx-xxxx will also work | |
# make sure the hook has permissions to execute after copying it over | |
message_file = ARGV[0]wi | |
original_message = File.read(message_file) |
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 'oauth' | |
require 'oauth/consumer' | |
require 'oauth/token' | |
require 'omniauth-yahoo' | |
key = 'Xdj0yJmk9VFV…..' | |
secret = '478787sha878978950e….' | |
options = { | |
:access_token_path => '/oauth/v2/get_token', | |
:authorize_path => '/oauth/v2/request_auth', |