/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/propose/github.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-06-15 14:25:08 UTC
  • mfrom: (7296.10.9 custom-gitlab)
  • Revision ID: breezy.the.bot@gmail.com-20190615142508-8urao0ot666rye66
Don't depend on the gitlab library for gitlab operations.

Instead, just use Breezy's built-in HTTP support.

Merged from https://code.launchpad.net/~jelmer/brz/custom-gitlab/+merge/367620

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
from ...i18n import gettext
44
44
from ...sixish import PY3
45
45
from ...trace import note
 
46
from ...transport.http import default_user_agent
46
47
from ...lazy_import import lazy_import
47
48
lazy_import(globals(), """
48
49
from github import Github
83
84
def connect_github():
84
85
    """Connect to GitHub.
85
86
    """
86
 
    user_agent = "Breezy/%s" % breezy_version
87
 
 
 
87
    user_agent = default_user_agent()
88
88
    auth = AuthenticationConfig()
89
89
 
90
90
    credentials = auth.get_credentials('https', 'github.com')
297
297
            return True
298
298
 
299
299
    @classmethod
300
 
    def probe_from_url(cls, url):
 
300
    def probe_from_url(cls, url, possible_transports=None):
301
301
        try:
302
302
            parse_github_url(url)
303
303
        except NotGitHubUrl: