Permalink
Browse files

Merge pull request #119 from cjones17/master

YouTrack Service Update
  • Loading branch information...
technoweenie committed Jul 19, 2011
2 parents fe93913 + 234c5ad commit 02ab4d0618114908f3505c591fdb8e6c4feb9abb
Showing with 4 additions and 2 deletions.
  1. +4 −2 services/you_track.rb
View
@@ -36,7 +36,8 @@ def process_commit(commit)
command = commit_line[/( |^)#\w+-\d+ (.+)/, 2].strip
command = "Fixed" if command.nil?
- execute_command(author, issue_id, command)
+ commentString = "Commit made by '''" + commit["author"]["name"] + "''' on ''" + commit["timestamp"] + "''\n" + commit["url"] + "\n\n{quote}" + commit["message"] + "{quote}"
+ execute_command(author, issue_id, command, commentString)
}
end
@@ -62,9 +63,10 @@ def find_user_by_email(email)
end
end
- def execute_command(author, issue_id, command)
+ def execute_command(author, issue_id, command, commentString)
res = http_post "rest/issue/#{issue_id}/execute" do |req|
req.params[:command] = command
+ req.params[:comment] = commentString
req.params[:runAs] = author
end
verify_response(res)

0 comments on commit 02ab4d0

Please sign in to comment.