Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add stories to PivotalTracker from Twitter hash
require 'twitter'
require 'pivotal-tracker'
Twitter.configure do |c|
c.consumer_key = "your consumer key"
c.consumer_secret = "your consumer secret key"
c.oauth_token = "oauth token"
c.oauth_token_secret = "oauth token secret"
end
PivotalTracker::Client.token = "your pivotal tracker accesstoken"
project = PivotalTracker::Project.find(your_project_id)
gokidea = Twitter.search("#your_hash_tag", lang: "ja", rpp: 100).results.map(&:text).reject {|t| t =~ /^RT /}
icebox = project.stories.all.map(&:name)
(gokidea - icebox).each {|t|
project.stories.create(name: t, story_type: "feature")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.