The purpose of this repository is to help enterprise administrators who maintain multiple GHE instances work out unique developers across multiple GHE instances. This script works for both maximum committers and currently consumed GHAS committers.
-
Clone this repository onto your local machine.
git clone https://github.com/advanced-security/ghes-cross-instance-committers.git
-
Change the directory to the repository you have just installed.
cd ghes-cross-instance-committers
-
Copy the
.env.sample
to.env
. On a Mac, this can be done via the following terminal command:cp .env.sample .env
Head to the following URL in each of your GHES instances:
https://${ghes-url}.com/stafftools/ghas_committers
If you are interested in knowing your maximum committer number (e.g. the total number of unique developers across your whole GHE instance), click the download button next to the Total billable committers if GHAS is enabled for all repositories
option.
If you are interested in knowing your current committer number (e.g. the total number of unique developers across your whole GHE instance who are curently consuming a GHAS licence), click the download button next to the Current active committer count
option.
Once that's downloaded, create a new folder and drop the CSV into that folder.
Repeat the steps above across all your GHES instances. Make sure you drop the content into the same folder, you do not need to create a new folder every time.
-
Install dependencies
npm install
-
Update the `.env. (Replace the XXX with the relative directory of the csv content you created above)
DIRECTORY_OF_CSV_CONTENT=XXX
-
Run the script
npm run start
The above script should output something like:
You have a total of XX unique developers across your GitHub instances.