Releases: jdennes/contribution-checker
Releases · jdennes/contribution-checker
Version 0.1.0
- Added
ContributionChecker::InvalidAccessTokenError
to rescue from invalid access tokens. - More optimisations to checks.
- Added specs and fixtures.
Version 0.0.2
New error class ContributionChecker::InvalidCommitUrlError
to the rescue:
>> checker = ContributionChecker::Checker.new \
?> :access_token => "<Your 40 char GitHub API token>",
?> :commit_url => "https://github.com/..."
>> checker.check
ContributionChecker::InvalidCommitUrlError: Invalid commit URL provided
Version 0.0.1
Initial release! To try it out:
require "contribution-checker"
checker = ContributionChecker::Checker.new \
:access_token => "<Your 40 char GitHub API token>",
:commit_url => "https://github.com/user/repo/commit/sha"
checker.check
=> {
:contribution => true,
:and_criteria => {
:commit_in_valid_branch => true,
:commit_in_last_year => true,
:repo_not_a_fork => true,
:commit_email_linked_to_user => true
},
:or_criteria => {
:user_has_starred_repo => false,
:user_can_push_to_repo => false,
:user_is_repo_org_member => true,
:user_has_fork_of_repo => false
}
}