Coder Social home page Coder Social logo

csv-github-import-export's Introduction

Import-issues-to-GitHub-from-CSV

###Caveat You should use two-factor authentication for git. Unfortunately, 2FA breaks this script and it's beyond my coding/Ruby skills to overcome that. You have been warned.

###Abandoned code At the moment I have no plans to update this code. It did what I needed at the time. To my absolute amazement, people who are noticeably better programmers than I have forked this project! If you are hoping to get new features, my best suggestion is that you contact one of the peole who have forked this repo. BTW, there's already a list of features to add, created by the incomparable https://github.com/dnewman108 here: https://github.com/controlgroup/CSV-GitHub-import-export/blob/master/Features_to_add.md

###Intro (WTF is this?) Product Owners and Project Mangers love spreadsheets! They want everything in spreadsheet form.

If you're using GitHub Issues (and we do) this means that one often needs to move things from GitHub into a spreadsheet ("I need a list of issues to show the client"), or from a spreadsheet into GitHub ("Here is the list of features we are committing to this sprint.") And, personally, I don't like doing things by hand if a computer can do them. And do them better.

Thus this repo.

There are two scripts here. One is for importing into GitHub Issues from a CSV file. The other is for getting issues out of GitHub and into a CSV file.

NOTE: currently, if you have two-factor authentication on, you'll have to turn it off for this to work. Which is a pain and not terribly secure.

###Documentation (The stuff you actually care about)

#####Getting Started

Make sure you have a GitHub account, that you know your username and password, and that you have access to the repository (repo) that you want to import to, or from which you wish to export.

You can use the "Clone in Desktop" or "Download Zip" functions on the GitHub page to download the files. If you want to do it using the command line, via ssh, use git clone [email protected]:controlgroup/CSV-GitHub-import-export.git

You will also need to install octokit.

#####Importing issues from a CSV file into GitHub using csv_issues_to_github.rb

./csv_issues_to_github.rb to import issues into GitHub from a CSV

There are two ways to use this. You use it interactively (the default) or you can hard-code your information into the script. If you want to switch, you need to comment out the former and un-comment the latter.

You will need to provide a CSV file to import. You will also need to provide it your GitHub username, your GitHub password, the name of your organization, and the name of your repository. If you're working on your own account on not as part of an org, the org is just your GitHub username.

The CSV file MUST be in the following format: title,description,assignee_username,label1,label2,label3

You can add more labels or remove labels to it if you wish. However...

Important note: all label fields need to be filled. So, if you know you have an issue with only one label, then you need to have only one label field. You do this by removing (or you can add) labels fields at the end of the script. The line for this is marked with a comment (currently it's line 66, but that could change.) This is a known deficiency that will, with luck, eventually be fixed.

Fields that have commas in them need to be in double quotes. (Some punctuation doesn't require this, other punctuation may.)

Either way you use this, you will have to provide your GH password. If you use it interactively, it will show your password on the command line. P-(

#####Exporting issues from GitHub to a CSV file using github_issues_to_csv.rb

./github_issues_to_csv.rb to export issues from GitHub into a CSV

This allows you to create a CSV file from issues in a repo. This, too, can be done interactively or not. And it will also show your password if you use it interactively.

You can also export only a specific milestone if you give it a milestone. If you don't provide a milestone, it will print all issues.

Note: It will put all labels in one column, without any delimiter. P-(

###Credits (The smart people who did the real work) It should be noted that I'm not much of a programmer, and I got a tremendous amount of help from Vik and Evan

In addition github_issues_to_csv was adapted from the work of others, specifically: https://gist.github.com/henare/1106008 and https://gist.github.com/tkarpinski/2369729

csv-github-import-export's People

Contributors

chasmastin avatar danmeltz avatar dnewman108 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.