Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make all tokens available

  • Loading branch information...
commit 390b4093a50a224679c396bea60f7bcd0012e6f7 1 parent 16c705d
@gnufied authored
Showing with 4 additions and 3 deletions.
  1. +1 −1  lib/issue_patch.rb
  2. +3 −2 lib/trackmine.rb
View
2  lib/issue_patch.rb
@@ -72,7 +72,7 @@ def pivotal_story_id
end
def pt_desc
- description + "\n" + " Issue ##{self.id} on Redmine"
+ description
end
end
View
5 lib/trackmine.rb
@@ -27,7 +27,8 @@ def projects
# Sets PivotalTracker token using user credentials from config/trackmine.yml
def set_token(email)
- pivotal_token = get_credentials['pivotal_token']
+ pivotal_token = get_credentials[email] || get_credentials['default_pivotal_token']
+
raise MissingCredentials.new("Missing credentials for trackmine.yml") if pivotal_token.nil?
begin
PivotalTracker::Client.token = pivotal_token
@@ -96,7 +97,7 @@ def create_pivotal_story(issue,pivotal_project_id)
:name => issue.subject,
:description => issue.pt_desc
)
- issue.custom_fields = [{'1' => pivotal_project_id},{'2' => story.id }]
+ issue.custom_field_values = {'1' => pivotal_project_id.to_s, '2' => story.id.to_s }
end
# Creates Redmine issues
Please sign in to comment.
Something went wrong with that request. Please try again.