Skip to content

osmandapp/github-projectv2-csv-exporter

Β 
Β 

Repository files navigation

πŸ“‚ GitHub Project CSV Exporter (ProjectV2)

Export GitHub project cards as CSV files. Uses the ProjectV2 API.

npm VersionΒ  View project on GitHubΒ  Deploy StatusΒ  Sponsor

Documentation

Read the official documentation.

Overview

This export tool allows you to export GitHub projects as a CSV.

Projects must exist within the ProjectV2 API. For exporting "classic" GitHub projects (older implementation), you can try using this exporter by Stephen Wu.

Features include:

  • ⬇️ Export all GitHub project cards as a CSV.
    • View your GitHub cards in your spreadsheet software of choice.
  • πŸŽ›οΈ Filter issues by status, customize fields, and exclude closed issues.
    • Only export cards with the statuses you specify, with options to choose custom fields, or hide closed issues.
  • πŸš€ Easy to use
    • Features a simple and easy to use web UI. Configure once. Click once to export.

Donate

I hope this project makes your life a little easier! If it does and you'd like to show your appreciation, consider supporting the project with a coffee or sponsorship.

Your support helps keep the project going and will earn you some serious virtual high fives. Maybe even a virtual fist bump if you're feeling extra cool.

Sponsor via GitHub Buy me a coffee Buy me 3 coffees Buy me 5 coffees

Table of Contents

Installation

npm i github-projectv2-csv-exporter

Usage

Via Website

Go here: GitHub Project Exporter.

Via npm

If you want to fetch the data yourself, you can install this package via npm and use the exported fetch functions.

Note: Your access token must include the following scopes: repo, read:org, read:user, read:project

fetchProjects

fetchProjects = async (login: string, isOrg: boolean, token: string): Promise<Projects>

Provide an org or username and the token. The promise will be resolved with a Projects instance.

Example
import { fetchProjects } from 'github-projectv2-csv-exporter';
// ...
fetchProjects('my-org', true, 'abc123mytoken').then((orgProjects) =>
  console.log(
    'Loaded projects:',
    orgProjects
      .getProjects()
      .map((p) => `${p.getTitle()} (number ${p.getProjectNumber()} | ${p.getTotalItemCount()} items)`)
      .join(', '),
  ),
);

fetchProjectItems

fetchProjectItems = async (login: string, isOrg: boolean, projectNumber: number, token: string, progress?: (loaded: number, total: number) => void): Promise<ProjectItem[]>

Provide an org or username, project number, and token. Optionally, you can provide a progress function that will be called periodically with the number of items loaded, and the total expected.

The promise will be resolved with an array of ProjectItem instances.

Example
import { fetchProjectItems } from 'github-projectv2-csv-exporter';
// ...
const projectNumber = loadedProject.getProjectNumber();
fetchProjectItems('my-org', true, projectNumber, 'abc123mytoken', (loaded, total) =>
  console.log(`Progress: ${Math.round((loaded / total) * 100)}%`),
).then((items) => console.log('Loaded', items.length, 'items'));

TypeScript

Type definitions have been included for TypeScript support.

Icon Attribution

Favicon by Twemoji.

Contributing

Open source software is awesome and so are you. 😎

Feel free to submit a pull request for bugs or additions, and make sure to update tests as appropriate. If you find a mistake in the docs, send a PR! Even the smallest changes help.

For major changes, open an issue first to discuss what you'd like to change.

⭐ Found It Helpful? Star It!

If you found this project helpful, let the community know by giving it a star: πŸ‘‰β­

License

See LICENSE.md.

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.5%
  • HTML 0.5%