Created
July 1, 2014 15:03
-
-
Save jdoconnor/9628b6340a6fa1bbc6f2 to your computer and use it in GitHub Desktop.
Revisions
-
Jay OConnor created this gist
Jul 1, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # gem install pivotal-tracker require 'pivotal-tracker' PivotalTracker::Client.token = 'YOUR API TOKEN' # Manually set API Token a_project = PivotalTracker::Project.find(YOUR PROJECT NUMBER) iterations = PivotalTracker::Iteration.current_backlog(a_project) stories = iterations.collect{ |i| i.stories }.flatten output = "" stories.each do |story| next if story.current_state == 'accepted' github_link = story.description.match /(https.*github.*\.com.+)/ output << "+ [#{story.name}](#{story.url})" output << "(#{story.labels})" unless story.labels.nil? || story.labels == '' output << " -- [github issue](#{github_link})" if github_link output << "\n" end puts output