Created
April 23, 2011 20:41
-
-
Save sc68cal/938959 to your computer and use it in GitHub Desktop.
Dynamsoft Issue -> Github Issues
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
from github2.client import Github | |
import csv | |
import sys | |
import re | |
project = sys.argv[4] | |
github = Github(username=sys.argv[2], api_token=sys.argv[3],requests_per_second=.25) | |
data = csv.reader(open(sys.argv[1])) | |
for row in data: | |
body_text =""" | |
Imported from Dynamsoft Issue Tracker, issue %s \n | |
Created By: %s | |
Assigned To: %s | |
Created: %s | |
Changed: %s | |
""" % (row[0],row[4],row[3],row[5],row[6]) | |
new_issue = github.issues.open(project, title=row[1],body=body_text) | |
if row[2] != "Active": | |
github.issues.close(project,new_issue.number) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment