def monkeypatch_github():
p = github.PullRequest.PullRequest
p.pretty = pretty
p.fullify = gh_pr_fullifier.fullify
p.jsonify = gh_pr_fullifier.jsonify
p.pastamaker_merge = pastamaker_merge
p.pastamaker_github_post_check_status = pastamaker_github_post_check_status
p.pastamaker_travis_post_build_results = \
pastamaker_travis_post_build_results
# Missing Github API
p.pastamaker_update_branch = webhack.web_github_update_branch
# FIXME(sileht): remove me, used by engine for sorting pulls
p.pastamaker_weight = property(lambda p: p.pastamaker["weight"])
# FIXME(sileht): Workaround https://github.com/PyGithub/PyGithub/issues/660
github.PullRequestReview.PullRequestReview._completeIfNeeded = (
lambda self: None)
评论列表
文章目录