npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

github-sync-repos

v0.1.5

Published

Sync GitHub labels across organization

Downloads

8

Readme

github-sync-repos

Actions Status

GitHub tools to synchronize milestones or labels across all organization/user repositories.

Prerequisites

Installation

Install from npm registry.

npm install github-sync-repos -g

To upgrade, you can run the above command again.

Usage

To find command help, type gsr -h:

$ gsr -h
Usage: gsr [options] <command> [command-options]

Commands:
  gsr labels <command>        List/add/delete labels of organization or user.
                                                                   [aliases: lb]
  gsr milestones <command>    List/add/delete milestones of a repository.
                                                                   [aliases: ms]
  gsr repositories <command>  List repositories of organization or user.
                                                      [aliases: repos, repo, rp]

GitHub:
  --organization   Github organization name.
  --template-repo  Github template repository name.
  --username, -u   Github account username. Required if API token is empty.
  --password, -p   Github account password. Required if API token is empty.
  --token          Github API token. Required if username is empty.

Options:
  --version      Show version number                                   [boolean]
  --config       Path to JSON config file
  --format       Response format. Available values are: plain, json.
                                                              [default: "plain"]
  --verbose, -v  Show more processing details.        [boolean] [default: false]
  -h, --help     Show help                                             [boolean]

For each command, you can type gsr <command> -h to get more detail help.

Provide GitHub Crendentials

There are several ways to provide command line options. The priority of finding options are (from top to low):

  1. Command line options,
  2. Environment variables on command line,
  3. Environment variables defined in .env file,
  4. Config json file,
  5. Default option value shown in gsr -h.

With Command Line Options

You can use gsr --token <my-api-token> <command> to specify API token in command line.

With Environement Variable

Use GSR_ to prefix your capitalized option name as environment variable name. For example:

$ GSR_TOKEN=<my-api-token> GSR_ORGANIZATION=<my-org-name> GSR_TEMPLATE_REPO=<tpl> gsr ls-repos

If you are using Windows, you will need cross-env. Install with command npm install --g cross-env then you can prefix the above command with cross-env. For example:

$ cross-env GSR_TOKEN=<my-api-token> GSR_ORGANIZATION=<my-org-name> GSR_TEMPLATE_REPO=<tpl> gsr ls-repos

With .env File

You can put GSR_* environment variables into a .env file. Please note, the .env has to be in same folder where you issue gsr command.

For example, create a .env file with this content and put into folder where you usually run your gsr command:

GSR_ORGANIZATION=<my-org>
GSR_TEMPLATE_REPO=<my-tpl-repo>
GSR_TOKEN=<my-api-token>

With config json File

You can create a config json file with key/value of option name/value. For example, create a ~/.config/gsr.json with this content:

{
  "organization": "<my-org>",
  "template-repo": "<my-tpl-repo>",
  "token": "<my-api-token>"
}

Then use this command to use the config file:

$ gsr --config ~/.config/gsr.json [command]