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

issue-ctl

v0.1.4

Published

migrates Issues, searches PR from commit, ...etc

Downloads

11

Readme

Feature

Migrates issues from one repository to another. These are posted as new one.

Usecase

  1. Publishes from GitHub Enterprise to GitHub though including a part of unpublished code. You need wrap it, so cannot use Migration of GitHub API due to exposing commit log.

How to Use

This is only dependant on Node.js over v8.0.0. NPM dependencies are nothing!

You can use this as CLI or Client Library.

CLI

Install

$npm i -g issue-ctl

Setup

Sets credencial information to your environment variables.

Or, you can rewrite configure file.

$sudo vim $(dirname $(which issue-ctl))/../lib/node_modules/issue-ctl/conf/credentials.js
module.exports =
{
  "src": {
    "endpoint": "your.enterprise.url",
    "repository": "org/repo",
    "auth": "oauth2token or username:passwd"
  },
  "dst": {
    "endpoint": "api.github.com",
    "repository": "org/repo",
    "auth": "oauth2token or username:passwd"
  }
}

Basic Authentication(=your GitHub login username:password) or OAuth2(=Personal access token) are available.

In case of OAuth2, you need the following scopes.

  • repo
  • admin:org

Checks on GitHub->Settings->Personal access token->Select scopes

Execute

$issue-ctl migrate
# or, get issues on local
$issue-ctl get > /tmp/issues.json
# post by environment variables after editting issues
$DST_ENDPOINT=api.github.com DST_REPOSITORY=darai0512/test DST_AUTH=darai0512:*** issue-ctl post /tmp/issues.json

|subcommand|arguments|description| |---|---|---| |get||displays all open issues from src as JSON format| |post|(JSON_absolute_path)|creates new issues of JSON_absolute_path to dst| |migrate||gets and posts issues from src to dst|

Client Library

Install

# stable
$npm i issue-ctl

# beta version
$npm i git+https://[email protected]/darai0512/issue-ctl
## or
$git clone https://github.com/darai0512/issue-ctl.git
$cd ./issue-ctl
$npm link
$cd (your directory)
$npm link issue-ctl

Usage

const {issue} = require('issue-ctl');

const main = async () => {
  const issues = await issue.get('api.github.com', 'org/repo', 'username:passwd');
  // ex, issues.title = prefix + issues.title + postfix;
  await issue.post('your.enterprise.url', 'org/repo', 'oauth2token', issues);
};

main().catch(console.error);

Authentication

Basic Authentication(=your GitHub login username:password) or OAuth2(=Personal access token) are available.

In case of OAuth2, you need the following scopes.

  • repo
  • admin:org

Checks on GitHub->Settings->Personal access token->Select scopes

References

available API

|tool|version|available APIs| | --- | --- | --- | |GitHub| |Rest v3 or GraphQL| |GitHub Enterprise|>= 2.10|Rest v3 or GraphQL| ||< 2.10|Rest v3| |GitLab(in the future???)|???|???|