Skip to content

Releases: jdennes/contribution-checker

Version 0.1.0

09 Jun 13:26
Compare
Choose a tag to compare
Version 0.1.0 Pre-release
Pre-release
  • Added ContributionChecker::InvalidAccessTokenError to rescue from invalid access tokens.
  • More optimisations to checks.
  • Added specs and fixtures.

Version 0.0.2

08 Jun 10:33
Compare
Choose a tag to compare
Version 0.0.2 Pre-release
Pre-release

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

07 Jun 15:56
Compare
Choose a tag to compare
Version 0.0.1 Pre-release
Pre-release

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
  }
}