2021 Fillmore Street #1128

}

24/7 solutions

How to Export GitHub Issues to Excel Easily

It is way more challenging than it should be to export GitHub issues to Excel . In the past, prior to Two Factor Authentication, you could use curl with your username and password to return JSON. curl -i "http://api.github.com/repos/{repo_name}/{project_name}/issues" -u "{user_name}" Unfortunately, you need Two Factor Authentication turned on for your GitHub organization. We require […]

It is way more challenging than it should be to export GitHub issues to Excel . In the past, prior to Two Factor Authentication, you could use curl with your username and password to return JSON.

curl -i "http://api.github.com/repos/{repo_name}/{project_name}/issues" -u "{user_name}"

Unfortunately, you need Two Factor Authentication turned on for your GitHub organization. We require all of the organizations that AllCode works with to turn on Two Factor Authentication.
For querying GitHub’s REST API with two factor authentication, your best solution is to make use of a Personal Access Token, but in order for the Personal Access Token to work, your app needs to be a GitHub App or OAuth App. None of our repos are.
So how do you dump all of your GitHub Issues to Excel so you can share the issues with the client. The answer is you make use of the hub command line utility. To get started,

  1. Clone the repo from GitHub into your working directory.
  2. Install hub (e.g. on macOS run: brew install hub). If you don’t have Homebrew, you can find it here
  3. Run: hub issue in your repo directory to list the open issues (it’s in Markdown format).
  4. If you have Two Factor Authentication turned on, you’ll be prompted for your username, password, and two factor authentication code.
  5. Supply the appropriate credentials for your GitHub account
  6. Run the follow command in the terminal hub issue -f "Issue|%I%nTitle|%t%nBody|%b%n%n" > GitHubIssues-01032019.txt

You’ll notice that the printf formatting is a little tricky. Details on this formatting are here.

-f, –format FORMAT

Pretty print the contents of the issues using format FORMAT (default: “%sC%>(8)%i%Creset %t% l%n”). See the “PRETTY FORMATS” section of git-log(1) for some additional details on how placeholders are used in format. The available placeholders for issues are:

%I: issue number

%t: title

%b: body

Hub Issue Formatting can be found here.

This command will generate a pipe delimited text file with the main attributes on the first line, and the body on 2 through n lines. The body of our issues are typically verbose.

Now open your GitHubIssues-01032019.txt file in Excel. When you’re prompted by Excel to specify Fixed Width or Delimiter, specify the pipe as the delimiter. You should be good to go.

Export GitHub Issues to Excel

Export GitHub Issues to Excel

Related Articles

AWS Free Tier

AWS Free Tier

Understandably, making the jump to the AWS cloud is not an easy investment to evaluate, especially from the perspective of a startup. Fortunately, AWS is generous enough to provide some hands-on experience with its various tools and utilities free of charge for either a short period of time or indefinitely depending on the service type. Here’s a rundown of everything you can expect from AWS’ Free Tier.

AWS Beginner Guide

AWS Beginner Guide

AWS (Amazon Web Services) is the current largest provider in Infrastructure as a Service (IaaS) and Platform as a Service (PaaS) for everything from databases to extra computing power. It provides solutions for whatever problems are brought by clients and it allows for ease of scalability so that users will only pay for what they need and use; especially during times of expected lower traffic.

How to Migrate an On-Premises Database to AWS

How to Migrate an On-Premises Database to AWS

The AWS Database Migration Service (AWS DMS) assists you in performing a safe and speedy migration of databases to AWS. The source database continues to function normally throughout the migration, hence reducing the amount of downtime experienced by applications that are dependent on the database. Data can be moved to or from the most popular commercial and open-source databases with the help of the AWS Database Migration Service.

Download our 10-Step Cloud Migration ChecklistYou'll get direct access to our full-length guide on Google Docs. From here, you will be able to make a copy, download the content, and share it with your team.