• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jdennes/contribution-checker: Check whether GitHub commits qualify as contributi ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

jdennes/contribution-checker

开源软件地址:

https://github.com/jdennes/contribution-checker

开源编程语言:

Ruby 98.3%

开源软件介绍:

GitHub Contribution Checker

People ❤️ GitHub Contributions. However, it's not always simple to tell why a commit isn't counted as a contribution. This library lets you check whether a specific commit qualifies as a contribution.

Developing

To start working on the project:

script/bootstrap

To run the specs:

script/test

Usage

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_email_is_not_generic => true,
    :commit_in_valid_branch      => true,
    :repo_not_a_fork             => true,
    :commit_email_linked_to_user => true,
    :commit_email                => "[email protected]",
    :default_branch              => "master"
  },
  :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,
    :user_has_opened_issue_or_pr_in_repo => false
  }
}

App

You might like to try out the Contribution Checker app built on top of this library:

checker

The source for the app is in jdennes/contribution-checker-app.

Created by @izuzak and @jdennes at the Hamburg Hackathon, June 2014.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap