Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contributor-count axiom #171

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

yannjor
Copy link
Contributor

@yannjor yannjor commented Aug 12, 2020

Motivation

See issue #169

Proposed Changes

Adds axiom to enable rules only on projects with a certain amount of contributors. Uses the node-gitlog library to get the contributor count of the repository by looking at the commit authors. This result can be a bit higher than the actual contributor count in some cases, as some authors could be bots or use different names in their commits but it seems to be quite accurate.

The axiom can be included and used like any other axiom, but it also supports the greater than or lesser than symbols. See tests/package/repolint.json for an example.

Test Plan

Some tests are included in tests/axioms/contributor_count_test.js.

@yannjor yannjor requested a review from trevmex as a code owner August 12, 2020 07:28
Adds axiom to enable rules only on projects with a certain amount of
contributors. Uses node-gitlog library to get the contributor count of the
repository. Some simple tests are also included.

See issue todogroup#169

Signed-off-by: Yann Jorelle <yann.jorelle@nokia.com>
@yannjor
Copy link
Contributor Author

yannjor commented Aug 21, 2020

@trevmex Would you have time to review this?

@caniszczyk caniszczyk merged commit dbc2aa4 into todogroup:master Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants