Skip to content

Commit

Permalink
Updating TargetProcess and YouTrack services to split over newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
David Czarnecki committed Oct 24, 2011
1 parent 5825309 commit 1ccbd5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions services/target_process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ def valid_response?(res)
end

def process_commit(commit)
author = commit["author"]["email"]
commit["message"] = [commit["message"]] unless commit["message"].is_a?(Array)
commit["message"].each { |commit_line|
author = commit["author"]["email"]
commit["message"].split("\n").each { |commit_line|
parts = commit_line.match(/(\s|^)#(\d+):?([^\s]+)?(.*)/)
next if parts.nil?
entity_id = parts[2].strip
Expand Down
3 changes: 1 addition & 2 deletions services/you_track.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def login

def process_commit(commit)
author = nil
commit["message"] = [commit["message"]] unless commit["message"].is_a?(Array)
commit["message"].each{ |commit_line|
commit["message"].split("\n").each{ |commit_line|
issue_id = commit_line[/( |^)#(\w+-\d+) /, 2]
next if issue_id.nil?

Expand Down

0 comments on commit 1ccbd5e

Please sign in to comment.