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

open-github-teams

v1.3.4

Published

Expose the github teams of an organization to the public as webpage and json using this Node.js server.

Downloads

11

Readme

Open Github Teams Server

js-standard-style Build Status Coverage Status

The github team api is private.

All actions against teams require at a minimum an authenticated user who is a member of the Owners team in the :org being managed. Additionally, OAuth users require the "read:org" scope.

This is awesome if you have a private organization but it complicates running an open organization like NodeSchool.

open-github-teams to the rescue!!!

open-github-teams is a small Node.js server that takes a little configuration and makes the teams accessible via JSON and HTML.

Get started!

  1. Install with $ npm i open-github-teams -g (you might need to prefix sudo)
  2. Get a private token from the github settings. The required permissions are read:org and admin:org_hook. Get a private token
  3. Start it with
    $ env GITHUB_TOKEN="<your-token-here>" GITHUB_ORG="<your-org-here>" open-github-teams
  4. Open the url in the browser after it says its connected. Enjoy.

Docker

It is also possible to start the server with docker!

$ docker run martinheidegger:open-github-teams

Ports

By default, the server will be started on the 80 port in http mode and Additionally at the 443 port if https is required. You can change those two values by specifying a HTTPS_PORT and HTTP_PORT.

$ env GITHUB_TOKEN="<your-token-here>" \
     GITHUB_ORG="<your-org-here>" \
     HTTPS_PORT=8443 \
     HTTP_PORT=8000 \
     open-github-teams

Immediate update

By default the system caches the team-data in memory on the server and re-loads it only every 20 days! To have immediate updates it is possible to setup Github hooks that invalidate the cache.

Since its not a good idea if others can invalidate the cache you need to create a SECRET that verifies that github is the one updating. To avoid that other people know this code the server has to run via https. open-github-teams automatically starts a free-ssl server using letsencrypt. Because it is free you need to provide a email address and a pro-forma I-agree-with-the-Terms-of-Service field that signs that you confirm with the tos.

$ env GITHUB_TOKEN="<your-token-here>" \
     GITHUB_ORG="<your-org-here>" \
     HTTP_PORT=8000 \
     SECRET="<your-secret-here" \
     HTTPS_EMAIL="<your-email-here>" \
     HTTPS_AGREE="yes" \
     HTTPS_PORT=8443 \
     open-github-teams

Note: By default the server will start with https if you pass in. You can explicitly prevent that from happening by setting the environment variable HTTP_ONLY to true.

How to generate a good secret

Generate a good secret key on Mac/Linux with

$ head -n 4096 /dev/urandom | shasum -a 256

Contribute

PR's and suggestions are always welcome! Please follow Contributing.md or open an issue if you have any problem.

License

ISC