Skip to content

Get information about all packages inside of your GitHub organisation

Notifications You must be signed in to change notification settings

oleg-koval/github-orgs-packages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-orgs-packages linted_by _sexy

Description

Get information for all packages inside of your github organisation

Installation

npm:

$ npm install -S github-orgs-packages

yarn:

$ yarn add github-orgs-packages

Usage

You need to provide following env variables:

GH_AUTH_TOKEN=***
GH_ORG_NAME=***

Code:

const githubOrgsPackages = require('github-orgs-packages');

const myOrgPackages = githubOrgsPackages()
myOrgPackages
.then((packages) => {
  // do smth with packages
})
.catch((error) => {
  // do smth with error
})

It will return similar output format to:

[
  {
    "name": "xyz",
    "description": "Publish npm packages with fewer screw-ups",
    "currentVersion": "3.0.0",
    "homepage": "https://github.com/davidchambers/xyz",
    "license": "WTFPL",
    "projects": [
      {
        "name": "cool-project",
        "version": "2.1.0",
        "description": "Description"
      }
    ]
  },
  {
    "name": "eslint",
    "description": "An AST-based pattern checker for JavaScript.",
    "currentVersion": "4.19.0",
    "homepage": "https://eslint.org",
    "license": "MIT",
    "projects": [
      {
        "name": "another-cool-project",
        "version": "2.1.0",
        "description": "Description"
      }
    ]
  }
]

Dependencies

  • bluebird: Full featured Promises/A+ implementation with exceptionally good performance
  • github-api: A higher-level wrapper around the Github API.
  • package-info: Get the information of a npm package
  • ramda: A practical functional library for JavaScript programmers.

Dev Dependencies

License

ISC © Oleg Koval