Created
January 26, 2013 15:45
-
-
Save sirkitree/4642971 to your computer and use it in GitHub Desktop.
Quick node script to import issues into GitHub. You'll want to `npm install github` first, which grabs http://github.com/ajaxorg/node-github
This file contains hidden or 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
| var path = require('path') | |
| , PATH_CONFIG = path.join(__dirname, '/source.json') | |
| , fs = require('fs') | |
| , source = JSON.parse(fs.readFileSync(PATH_CONFIG, "utf8")) | |
| , GitHubApi = require("github") | |
| , github = new GitHubApi({version: "3.0.0"}) | |
| , auth-user = "" | |
| , auth-pass = "" | |
| , user = 'otcshare' | |
| , repo = 'tizen.org' | |
| , milestone = '24'; | |
| github.authenticate({ | |
| type: "basic", | |
| username: auth-user, | |
| password: auth-pass | |
| }); | |
| for (var i = source.length - 1; i >= 0; i--) { | |
| var title = source[i].title | |
| , labels = source[i].tags; | |
| github.issues.create({ | |
| user: user, | |
| repo: repo, | |
| title: title, | |
| milestone: milestone, | |
| labels: labels | |
| }, function(err, res) { | |
| console.log(res); | |
| }) | |
| }; |
This file contains hidden or 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
| [ | |
| { | |
| "title": "Basic data model", | |
| "tags": [ | |
| "Editorial Workflow" | |
| ] | |
| }, | |
| { | |
| "title": "Workflow States", | |
| "tags": [ | |
| "Editorial Workflow" | |
| ] | |
| }, | |
| { | |
| "title": "Workflow Assignments", | |
| "tags": [ | |
| "Editorial Workflow" | |
| ] | |
| }, | |
| { | |
| "title": "Workflow Views", | |
| "tags": [ | |
| "Editorial Workflow" | |
| ] | |
| }, | |
| { | |
| "title": "Workflow UX Improvements", | |
| "tags": [ | |
| "Editorial Workflow" | |
| ] | |
| }, | |
| { | |
| "title": "Workflow Reminders", | |
| "tags": [ | |
| "Editorial Workflow" | |
| ] | |
| }, | |
| { | |
| "title": "Behat Testing", | |
| "tags": [ | |
| "Editorial Workflow" | |
| ] | |
| }, | |
| { | |
| "title": "Add workflow to additional content types", | |
| "tags": [ | |
| "Editorial Workflow" | |
| ] | |
| }, | |
| { | |
| "title": "Sub-menu nav", | |
| "tags": [ | |
| "Documentation Navigation" | |
| ] | |
| }, | |
| { | |
| "title": "Filters/Search", | |
| "tags": [ | |
| "Documentation Navigation" | |
| ] | |
| }, | |
| { | |
| "title": "Landing Page", | |
| "tags": [ | |
| "Documentation Navigation" | |
| ] | |
| }, | |
| { | |
| "title": "Book Navigation", | |
| "tags": [ | |
| "Documentation Navigation" | |
| ] | |
| }, | |
| { | |
| "title": "Feedback Theming", | |
| "tags": [ | |
| "Documentation Navigation" | |
| ] | |
| }, | |
| { | |
| "title": "Printing of books", | |
| "tags": [ | |
| "Documentation Navigation" | |
| ] | |
| }, | |
| { | |
| "title": "Data model", | |
| "tags": [ | |
| "W3C Support Documentation" | |
| ] | |
| }, | |
| { | |
| "title": "Hierarchical display", | |
| "tags": [ | |
| "W3C Support Documentation" | |
| ] | |
| }, | |
| { | |
| "title": "Version and group filtering", | |
| "tags": [ | |
| "W3C Support Documentation" | |
| ] | |
| }, | |
| { | |
| "title": "Ongoing data import", | |
| "tags": [ | |
| "W3C Support Documentation" | |
| ] | |
| }, | |
| { | |
| "title": "Visual design and theming", | |
| "tags": [ | |
| "W3C Support Documentation" | |
| ] | |
| }, | |
| { | |
| "title": "Export", | |
| "tags": [ | |
| "W3C Support Documentation" | |
| ] | |
| }, | |
| { | |
| "title": "Data model, Assesing Types", | |
| "tags": [ | |
| "Dev Guide Import" | |
| ] | |
| }, | |
| { | |
| "title": "Hierarchical display", | |
| "tags": [ | |
| "Dev Guide Import" | |
| ] | |
| }, | |
| { | |
| "title": "Version filtering", | |
| "tags": [ | |
| "Dev Guide Import" | |
| ] | |
| }, | |
| { | |
| "title": "Doxygen format parsing", | |
| "tags": [ | |
| "Dev Guide Import" | |
| ] | |
| }, | |
| { | |
| "title": "Ongoing data import", | |
| "tags": [ | |
| "Dev Guide Import" | |
| ] | |
| }, | |
| { | |
| "title": "Visual design and theming", | |
| "tags": [ | |
| "Dev Guide Import" | |
| ] | |
| }, | |
| { | |
| "title": "Export", | |
| "tags": [ | |
| "Dev Guide Import" | |
| ] | |
| }, | |
| { | |
| "title": "Templates for documentation content type", | |
| "tags": [ | |
| "Documentation Data Model Improvements" | |
| ] | |
| }, | |
| { | |
| "title": "Editorial Milestone Scheduling", | |
| "tags": [ | |
| "Content Staging" | |
| ] | |
| }, | |
| { | |
| "title": "Milestone Preview", | |
| "tags": [ | |
| "Content Staging" | |
| ] | |
| } | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment