-
-
Save Epictetus/3068890 to your computer and use it in GitHub Desktop.
add stories to PivotalTracker from Twitter hash
This file contains 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
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