Skip to content
This repository has been archived by the owner on Aug 12, 2019. It is now read-only.

Latest commit

 

History

History
35 lines (22 loc) · 926 Bytes

README.md

File metadata and controls

35 lines (22 loc) · 926 Bytes

Count lines of code for a GitHub organisation

Install

  1. git clone https://github.com/benbalter/count-org-loc && cd count-org-loc
  2. gem install bundler
  3. script/bootstrap

Usage

script/count [ORGANISATION_NAME]

This will not count forked repos.

For a single repo (e.g. counting the Indy repos under Hyperledger):

./countsingle [GIT_CLONE_URL]

Counting private repositories

To look at private repositories, you'll need to pass a personal access token with repo scope as GITHUB_TOKEN. You can do this by adding GITHUB_TOKEN=[TOKEN] to a .env file in the repository's root.

If you are working with GitHub Enterprise and want to change your URL, simply add GITHUB_ENTERPRISE_URL=https://<ghe-url>/api/v3 to the .env file

Sample .env File :

GITHUB_TOKEN="<token>"
GITHUB_ENTERPRISE_URL="https://my-ghe.local/api/v3"