Skip to content

Latest commit

 

History

History
103 lines (66 loc) · 2.12 KB

File metadata and controls

103 lines (66 loc) · 2.12 KB

Mayhem Contributor Count

This app will help you determine the number of contributors for your source control repositories for the purpose Mayhem licensing.

Running (Docker Instructions)

Prerequisites

  • docker

Instructions

  1. Clone the repository
git clone git@github.com:ForAllSecure/contributor-count.git
  1. Build the Docker image
docker build -t mayhem-contributor-count:latest .
  1. Run the app with docker (Example azure devops)
docker run -it --rm mayhem-contributor-count:latest azure-devops --token pvk... --organization my-organization

Running from source (Python Instructions)

Prerequisites

  • Python 3.9+

Instructions

  1. Clone the repository
git clone git@github.com:ForAllSecure/contributor-count.git
  1. Create a Virtual Environment
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Run the app (Example azure devops)
./contrib-count.py azure-devops --token pvk... --organization my-organization

Supported SCM (Source Control Management) sources

Azure DevOps

Prerequisites

  • Personal access token

    You will need a Personal Access Token in order to access your Azure DevOps repositories.

Examples

ℹ️ The following examples run the script from source.

If you are using Docker instructions, simply substitute

./contrib-count.py

for

docker run -it --rm mayhem-contributor-count:latest

Get contributor counts for ALL Projects in the last 90 days

./contrib-count.py azure-devops --token pvk... --organization my-organization

Get contributor counts for ALL Projects in the last 180 days

./contrib-count.py azure-devops --token pvk... --organization my-organization --since-days 180

Get contributor counts for specific Projects in the last 90 days

./contrib-count.py azure-devops --token pvk... --organization my-organization --projects "project1,project2"