GitXplorerGitXplorer
j

github-commits-by-repository

public
2 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
cd31e500746c4cd165d8808f68734d7aba3e90b7

Improve documentation

jjgorset committed 4 years ago
Unverified
424dc6122ad476e8cb0ce54e84e7ea204c09bc29

Clean up

jjgorset committed 4 years ago
Unverified
61d64086d688d016bebefdf44ba651418435413b

Fix license

jjgorset committed 4 years ago
Unverified
fa1577f0de53e319244166c7ac2bf1a824d21eab

Improve formatting

jjgorset committed 4 years ago
Unverified
1ef98b79d9277f6ab55b392b037c4d5cb22c0d7b

Add installation instructions

jjgorset committed 4 years ago
Unverified
33910386860246e86f6e0778c056c08775c2b384

License under MIT

jjgorset committed 4 years ago

README

The README file for this repository.

GitHub commits by repository

A script to show commits for a given user, grouped by repository

$ github-commits-by-repository -h
Options:
      --version  Show version number                                   [boolean]
  -l, --limit    Limit to this number of commits         [number] [default: 100]
  -s, --sum      Sum the results                      [boolean] [default: false]
  -h, --help     Show help                                             [boolean]

Installation

$ npm install github-commits-by-repository

Configuration

To search GitHub enterprise, set these environment variables:

  • GITHUB_ACCESS_TOKEN: A GitHub access token
  • GITHUB_BASE_URL: The (full) base URL of your GitHub Enterprise API (e.g. https://github.yourcompany.com/api/v3)

Usage

Search for one user

$ github-commits-by-repository jgorset --limit 100
{
  users: [
    {
      user: 'jgorset',
      commitsByRepository: {
        'schibsted/slack-calendar-topic': 40,
        'schibsted/pingdom-status-page': 30,
        'jgorset/facebook-messenger': 18,
        'schibsted/deathstar-middleware': 7,
        'jgorset/turbotest': 2,
        'Unleash/unleash': 1,
        'schibsted/schibsted.github.io': 1,
        'jgorset/label': 1
      }
    }
  ]
}

Search for several users

$ github-commits-by-repository jgorset,timkurvers --limit 100
{
  users: [
    {
      user: 'jgorset',
      commitsByRepository: {
        'schibsted/slack-calendar-topic': 40,
        'schibsted/pingdom-status-page': 30,
        'jgorset/facebook-messenger': 18,
        'schibsted/deathstar-middleware': 7,
        'jgorset/turbotest': 2,
        'Unleash/unleash': 1,
        'schibsted/schibsted.github.io': 1,
        'jgorset/label': 1
      }
    },
    {
      user: 'timkurvers',
      commitsByRepository: {
        'timkurvers/redota': 50,
        'timkurvers/grumbles': 28,
        'timkurvers/timkurvers.github.io': 12,
        'timkurvers/dota2-model-viewer': 9,
        'timkurvers/advent-of-code': 1
      }
    },
  ]
}

Sum the results

$ github-commits-by-repository jgorset,timkurvers --limit 100 --sum
{
  users: [...],
  sum: {
    users: [ 'jgorset', 'timkurvers' ],
    commitsByRepository: {
      'timkurvers/redota': 50,
      'schibsted/slack-calendar-topic': 40,
      'schibsted/pingdom-status-page': 30,
      'timkurvers/grumbles': 28,
      'jgorset/facebook-messenger': 18,
      'timkurvers/timkurvers.github.io': 12,
      'timkurvers/dota2-model-viewer': 9,
      'schibsted/deathstar-middleware': 7,
      'jgorset/turbotest': 2,
      'Unleash/unleash': 1,
      'schibsted/schibsted.github.io': 1,
      'jgorset/label': 1,
      'timkurvers/advent-of-code': 1
    }
  }
}