Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ctexport

Tools to import and export, via CSV, from GitHub.

github, csv, import, export

readme

GitHub CSV Tools Build Status

Import and export GitHub issues via CSV

Usage

Prerequisite: Install Node.js, then run this to install:

npm install -g github-csv-tools

After install, githubCsvTools --help for info on how to use, or see below.

Instructions for exporting or importing:

To Import Issues

Currently imports title, description, labels, status (closed or open) and milestones.

githubCsvTools myFile.csv

To Export Issues

githubCsvTools
Option Default Notes
-f, --exportFileName YYYY-MM-DD-hh-mm-ss-issues.csv The name of the CSV you'd like to export to.
-a, --exportAttributes number, title, labels, state, assignees, milestone, comments, created_at, updated_at, closed_at, body Comma-separated list of attributes (columns) in the export**.
-c, --exportComments n/a Include comments in the export.

** List of all possible options for exportAttributes: url, repository_url, labels_url, comments_url, events_url, html_url, id, node_id, number, title, user, labels, state, locked, assignee, assignees, milestone, comments, created_at, updated_at, closed_at, author_association, body (more info)

Tokens

For all actions, the tool will ask you to input a GitHub token. To obtain this token:

  1. Go to https://github.com/settings/tokens
  2. Click "Generate New Token"
  3. Check on repo
  4. Copy/paste the token provided when the tool asks for it.

Other Options

Option Notes
-V, --version output the version number
-g, --github_enterprise Your GitHub Enterprise URL.
-t, --token The GitHub token. https://github.com/settings/tokens
-h, --help See all the options and help.

Development

  1. Clone the repo.
  2. Browse to repo, then run npm install -g

Changelog

See CHANGELOG.md

Thanks

changelog

Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

Unreleased

1.0.3 - 2020-05-03

Changed

  • Fixed month number in export (#16)

1.0.2 - 2020-04-28

Added

  • exportAttributes option (#15)

Changed

1.0.1 - 2020-04-21

  • Metadata and README - no functionality changes.

1.0.0 - 2020-04-18

Added

  • Exporting issues is now supported. Just call githubCsvTools with no file input. See githubCsvTools --help for more info.

0.4.0 - 2020-04-18

Changed

  • Updated to octokit/rest.js v17
    • pathPrefix no longer supported
    • Send full URL in for github_enterprise (if not sent, will use https://api.github.com by default)
  • bottleneck package is no longer used in favor of @octokit/plugin-throttling
  • Supporting current and LTS versions of Node.js.

0.3.0 - 2017-12-22

Changed

  • Re-publishing to NPM with LF line endings instead of CRLF

0.2.0 - 2017-07-19

Added

  • Support for Hosted Github (See --github_enterprise commandline switch)
  • Ability to create issues that are already closed (state csv column)
  • Assignee (assignee csv column)
  • "Bottleneck" to limit frequency of requests to the GitHub API.
  • Milestone support (milestone csv column)

Thanks

  • @kwhite for Bottleneck and milestone features
  • @ojacques for Hosted Github, state, and assignee features

0.1.0 - 2016-07-04

Added

  • Basic CSV import functionality.
  • A few basic tests