0.5.0 • Published 2 years ago

@artginzburg/github-user-downloads v0.5.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Purpose

Getting total number of downloads for all releases of all repositories of a GitHub user by username

Preparation

Assuming you have Node.JS installed

  1. Create a Personal Access Token (Following GitHub Docs)

    No scopes (permissions) needed — just the token

Usage

As a CLI

GITHUB_TOKEN=ghp_321yourPersonalAccessToken npx @artginzburg/github-user-downloads username

if username is ommited, uses $USER environment variable instead.

As an ES module

I'm personally using it via a GitHub Action with cron to fetch my stats daily. Also, GitHub Actions provide you a GITHUB_TOKEN, with no need to create it manually.

Testing

  1. Clone the repo
  2. Install dependencies (npm i)
  3. Set GITHUB_TOKEN and USER (if your local username is not the one you want to check) environmental variables (use .env file if you want)
  4. Run npm test, or npm start username
0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago