Ejemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     extra_headers = {
         'Authorization': 'token %s' % env.get('CODECOV_API_ACCESS_TOKEN'),
         'User-Agent': 'AMPProjectMetrics/1.0.0',
         'Content-Type': 'application/json'
     }
     props = agithub_base.ConnectionProperties(api_url='codecov.io',
                                               url_prefix='/api/gh',
                                               secure_http=True,
                                               extra_headers=extra_headers)
     self.setClient(agithub_base.Client(*args, **kwargs))
     self.setConnectionProperties(props)
Ejemplo n.º 2
0
    def __init__(self, *args, **kwargs):
        extra_headers = {
            'User-Agent': 'AMPProjectMetrics/1.0.0',
            'Content-Type': 'application/json',
            'Authorization': 'token %s' % env.get('TRAVIS_API_ACCESS_TOKEN'),
            'Travis-API-Version': '3',
        }

        props = agithub_base.ConnectionProperties(api_url='api.travis-ci.org',
                                                  secure_http=True,
                                                  extra_headers=extra_headers)
        self.setClient(agithub_base.Client(*args, **kwargs))
        self.setConnectionProperties(props)