Created
July 1, 2014 15:03
-
-
Save jdoconnor/9628b6340a6fa1bbc6f2 to your computer and use it in GitHub Desktop.
pivotal to markdown
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 characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment