Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(6)  |  Derive(0)  |  Import(1)
Factory for the Github client

        def get_client(config, user, repo):
    """
    Factory for the Github client
    """
    if 'GITHUB_OAUTH_TOKEN' in config:
        gh = Github(
            base_url=config['GITHUB_URL'],
            login=config['GITHUB_USER'],
            token=config['GITHUB_OAUTH_TOKEN'],
            user=user,
            repo=repo)
    else:
        gh = Github(
            base_url=config['GITHUB_URL'],
            login=config['GITHUB_USER'],
            password=config['GITHUB_PASSWORD'],
            user=user,
            repo=repo)
    return gh
        


src/l/i/lint-review-HEAD/lintreview/web.py   lint-review(Download)
from flask import Flask, request, Response
from lintreview.config import load_config
from lintreview.github import get_client
from lintreview.github import get_lintrc
from lintreview.tasks import process_pull_request
        return close_review(user, repo, pull_request)
 
    gh = get_client(app.config, user, repo)
    try:
        lintrc = get_lintrc(gh)

src/l/i/lint-review-HEAD/lintreview/cli.py   lint-review(Download)
            credentials['GITHUB_URL'] = app.config['GITHUB_URL']
            gh = github.get_client(
                credentials,
                args.user,
                args.repo)
        else:
            gh = github.get_client(
                app.config,

src/l/i/lint-review-HEAD/lintreview/tasks.py   lint-review(Download)
        return
 
    gh = github.get_client(config, user, repo)
    try:
        log.info('Loading pull request data from github.')

src/l/i/lint-review-HEAD/tests/test_github.py   lint-review(Download)
def test_get_client():
    gh = github.get_client(config, 'markstory', 'lint-review')
    assert isinstance(gh, Github)
 
 
def test_get_lintrc():
    gh = github.get_client(config, 'markstory', 'lint-review')