Skip to content

Instantly share code, notes, and snippets.

@dje
Created September 29, 2012 18:50
Show Gist options
  • Save dje/3804873 to your computer and use it in GitHub Desktop.
Save dje/3804873 to your computer and use it in GitHub Desktop.
require 'trello'
require 'pivotal-tracker'
include Trello
include Trello::Authorization
include PivotalTracker
Client.token = 'some_token'
Trello::Authorization.const_set :AuthPolicy, OAuthPolicy
OAuthPolicy.consumer_credential =
OAuthCredential.new( 'some_creds',
'some_secret' )
OAuthPolicy.token = OAuthCredential.new( 'some_token', nil )
p = Project.find( 0 )
p.stories.all( { :type => 'Feature', :state => 'unscheduled'} ).each do |s|
Card.create( { :name => s.name, :list_id => 'some_list_id', :description => s.description })
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment