Created
November 5, 2014 07:22
-
-
Save kei-s/ef803493abc4c8c380c4 to your computer and use it in GitHub Desktop.
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 'csv' | |
require 'pry' | |
require 'trello' | |
Trello.configure do |config| | |
config.developer_public_key = 'TRELLO_PUBLIC_KEY' | |
# Access https://trello.com/1/authorize?key=#{substitutewithyourapplicationkey}&name=My+Application&expiration=1day&response_type=token&scope=read,write | |
config.member_token = 'ACCESS_TOKEN' | |
end | |
backlog = Trello::Board.find('LIST_ID').lists.first | |
csv = CSV.read('IMPORTED_CSV_FROM_PIVOTAL', headers: true) | |
csv.each do |record| | |
next if record['Current State'] == 'accepted' | |
title = record['Title'] | |
description = record['Description'] | |
Trello::Card.create( | |
name: title, | |
desc: description, | |
list_id: backlog.id | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment