An open API service indexing awesome lists of open source software.

https://github.com/sv592/sort-authors-github-

Returns a text file containing the top commit authors for a repo during any period of time and their individual total commits.
https://github.com/sv592/sort-authors-github-

git github javascript nodejs

Last synced: 3 months ago
JSON representation

Returns a text file containing the top commit authors for a repo during any period of time and their individual total commits.

Awesome Lists containing this project

README

          

# Sort Authors Github

DESCRIPTION
--------------------------------------------------------------------------------------
Returns a text file containing the top commit authors for a repo during a particular period and their individual total commits

REQUIREMENTS
--------------------------------------------------------------------------------------
This script requires the following to function:

.[NODEJS] V14.15.1
.[GIT] V2.29.2
.[ShellJS] V0.8.5

INSTALLATION
-------------------------------------------------------------------------------------
Install NODE globally as normal. Visit
https://nodejs.org/en/

Install GIT globally as normal. Visit
https://git-scm.com/

Install Node Modules. Run
`npm i` within the sort authors folder


CONFIGURATION
-------------------------------------------------------------------------------------
Upon starting the script, it will promot the user to enter the required valued in the following formats.
The repo path has to be up the root directory.

1. Full repository path (locally) = FORMAT - "C:\Users\shaqu\Desktop\Sort Authors"
2. Starting date for period of data retrieval = FORMAT - Dec 9 2021
3. Ending date for the period of data retrieval = FORMAT - July 9 2022
4. Desired number of Authors to return = FORMAT - 12

RUN
-------------------------------------------------------------------------------------
Within terminal. Run
`node sortAuthors.js`

OUTPUT
-------------------------------------------------------------------------------------
The CLI terminal will start up welcoming the user, then proceeding to get the required info. When all necessary information is entered a completion message will be logged and a text file titled "authors" will be created within the root directory of the working folder. This contains the top authors for the given period. With the total number of commits listed on the left as well as their names and email addresses.

![Screenshot 2022-10-27 094733](https://user-images.githubusercontent.com/58669882/198302441-36af50d0-89b5-4be4-9133-49e90be2de16.png)

EXAMPLE:

89 Rodolfo Alonso Hernandez
52 Slawek Kaplonski
33 yatinkarel
13 Jakub Libosvar
12 LIU Yulong
12 elajkat
9 Oleg Bondarev
8 zhouhenglc
5 Arnau Verdaguer
5 Frode Nordahl

Troubleshooting
------------------------------------------------------------------------------------
When running the script multiple times be sure to clear the authors.txt file or delete it entirely because the information will be appended to the existing data and this can be confusing.

The number of authors will have to be adjusted according to the number of authors within the repository for the given period. If the number is adjusted more than the total amount of commit authors avaliable, the script will return undefined for the additional entries.