https://github.com/asterinas/score-and-rank-contributors
A command-line tool to score and rank contributors based on their activity over a set of projects by analyzing Git histories
https://github.com/asterinas/score-and-rank-contributors
Last synced: 17 days ago
JSON representation
A command-line tool to score and rank contributors based on their activity over a set of projects by analyzing Git histories
- Host: GitHub
- URL: https://github.com/asterinas/score-and-rank-contributors
- Owner: asterinas
- License: apache-2.0
- Created: 2024-01-30T03:32:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-03T02:18:11.000Z (over 2 years ago)
- Last Synced: 2024-04-18T02:12:49.141Z (about 2 years ago)
- Language: Python
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# score-and-rank-contributors
A command-line tool to score and rank contributors
based on their activity over a set of projects
by analyzing Git histories.
The usage of the tool is summarized below:
```bash
./score-and-rank-contributors [--since since_date] [--authors author_list] project_1 ... project_N
```
## Basic Usage
The command extracts and accumulates contributor statistics
from the Git histories in the given project directories
`project_1`, ..., `project_N`.
Each author with a unique email address is treated
as a unique contributor
and scored according to his or her contribution statistics.
The command outputs a JSON array of contributors, ranked by score.
Here is an example command.
```bash
./score-and-rank-contributors --since 2022-01-01 --authors contributors.txt my_project
```
Here is an example output.
```json
[
{
"rank": 1,
"name": "Tom",
"score": 1000
},
{
"rank": 2,
"name": "Jerry",
"score": 123
},
{
"rank": 3,
"name": "Spike",
"score": 1
}
]
```
## Optional Arguments
An optional `since_date` argument,
in `YYYY-MM-DD` format,
may be given
so that only the commits authored since `since_date` count.
An optional `author_list` argument may be given
to specify a text file,
where each line provides some extra information
about a contributor.
```
Contributor A
Contributor B's Display Name
```
Providing the `author_list` file serves two purposes.
First,
an individual may own multiple emails.
Without any assistance,
the tool has no way of knowing
that these different email addresses
belong to the same contributor.
Second,
a contributor may prefer the tool
to use a different display name
than the one in the Git history.
## Contribution Scores
A contributor owns a point for
1. Every commit that he or she authors;
2. Every 100 lines of additions or deletions that he or she authors.