Skip to content

kevinkhill/gitregator

Repository files navigation

GitRegator

NPM version NPM downloads MIT License

GitRegator is a simple utility to ag-git-regate information from your projects on github.

Install

npm i gitregator

Usage

Drop a .gitregator.yml in the root of any project you want to get picked up.

Load some information in it

icon: "fa fa-github"
name: "GitRegator"
description: "CLI tool for aggregating information from github projects."

Create your client

const GitRegator = require("./gitregator");

const client = new GitRegator({
  username: <GITHUB_USERNAME>,
  apiKey: <GITHUB_API_KEY>
});

Then fetch one

(async () => {
  const info = await client.getInfoFromRepo("<REPO_NAME>");

  console.log(info); // { "icon": "fa fa-github", "name": "GitRegator", "description": "CLI tool ..."
})();

Or fetch them all!

(async () => {
  const repos = await client.getUserRepoTitles();

  if (repos.length > 0) {
    for (const repo in repos) {
      const info = await client.getInfoFromRepo(repo);
      console.log(info);
    }
  }
})();

Resources

License

GitRegator is freely distributable under the terms of the MIT license.