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

gh-repo-elements-sync-tool

v1.0.0

Published

A simple cli tool to sync milestones and labels between github repositories (organizations)

Downloads

7

Readme

Overview

github-sync.js is a small script to keep in sync labels and milestones across many repositories and organizations. You can also use it to sync github.com repositories with your github enterprise installation.

Installation

Checkout repository and run:

npm install

Authorization / authentication

To write changes to the target repositories you need to provide a token. You can get one from GitHub -> Settings -> Developers Settings -> Personal access tokens. If you work with different instances of github you can provide separate access tokens: source-token and target token. Both fallback to the token option and finally to anonymous access. Please be aware that github rate limiting is very aggressive for anonymous access, so you will be probably blocked after few tries.

Dry-run mode

If you are not sure what will happen after execute the command you can run the script with --dry-run option. It will run in the read only mode and will write down all the operations that should be executed.

Update-only mode

Update only mode can be useful if you do not want to create all the labels or milestones in the target reposiotries, but you want to unify descriptions, colors (for labels) or due dates (for milestones).

Usage examples

Synchronize labels starting with area/ and stale label from https://github.com/org/repo repository to all repositories in https://github.com/org2 organization'):

github-sync.js labels -s org/repo -t org2 -l "area/.*" stale --token github_token

Synchronize milestones 1.18, 1.19, and 1.20 from https://github.com/org/repo repository to Github Enterprise repo https://github.example.com/org/repo:

github-sync.js milestones -s org/repo --source-token github_token -t org/repo --target-base-url "https://github.example.com/api/v3" --target-token github_enterprise_token -l 1.18 1.19 1.20

Create/update all labels from org/repo in all repositories in the organization org2 and in repository org3/repo:

github-sync.js labels -s org/repo -t org2 org3/repo --token github_token

Display create/update operations to sync all milestones from org/repo to all repositories in that organization:

github-sync.js milestones -s org/repo -t org --dry-run

Only update descriptions and due dates for all milestones from org to match milestones from org/repo:

github-sync.js milestones -s org/repo -t org --update-only

Delete closed milestones without any issue (empty) from target org/repo:

github-sync.js delete-empty-milestones -t org

Contribution

If you find some problems feel free to create issues / pull requests.