Exemplo n.º 1
0
def bugzilla_info(ui, profile):
    bugzilla = ui.config("bzexport", "bugzilla",
                         "https://bugzilla.mozilla.org/")
    api_server = '%s/bzapi/' % bugzilla.rstrip('/')

    # The API server setting was from days before Bugzilla hosted the API
    # server itself. Warn if this setting is defined.
    legacy_api_server = ui.config('bzexport', 'api_server', None)
    if legacy_api_server:
        ui.warn(
            '(the bzexport.api_server config option is deprecated and ignored; '
            'delete it from your config)\n')

    # The [bzexport] auth config entries are deprecated in favor of
    # [bugzilla] via mozhg.auth.
    username = ui.config("bzexport", "username", None)
    password = ui.config("bzexport", "password", None)

    if username:
        ui.warn(
            '(the bzexport.username config option is deprecated and ignored; '
            'use bugzilla.username instead)\n')

    if password:
        ui.warn(
            '(the bzexport.password config option is deprecated and ignored; '
            'use bugzilla.password or cookie auth by logging into Bugzilla in Firefox)\n'
        )

    auth = bzauth.get_auth(ui, bugzilla, profile)
    return auth, api_server, bugzilla
Exemplo n.º 2
0
def bugzilla_info(ui, profile):
    bugzilla = ui.config("bzexport", "bugzilla", "https://bugzilla.mozilla.org/")
    api_server = '%s/bzapi/' % bugzilla.rstrip('/')

    # The API server setting was from days before Bugzilla hosted the API
    # server itself. Warn if this setting is defined.
    legacy_api_server = ui.config('bzexport', 'api_server', None)
    if legacy_api_server:
        ui.warn('(the bzexport.api_server config option is deprecated and ignored; '
            'delete it from your config)\n')

    # The [bzexport] auth config entries are deprecated in favor of
    # [bugzilla] via mozhg.auth.
    username = ui.config("bzexport", "username", None)
    password = ui.config("bzexport", "password", None)

    if username:
        ui.warn('(the bzexport.username config option is deprecated and ignored; '
            'use bugzilla.username instead)\n')

    if password:
        ui.warn('(the bzexport.password config option is deprecated and ignored; '
            'use bugzilla.password or cookie auth by logging into Bugzilla in Firefox)\n')

    auth = bzauth.get_auth(ui, bugzilla, profile)
    return auth, api_server, bugzilla
def bugzilla_info(ui, profile):
    api_server = ui.config("bzexport", "api_server", "https://api-dev.bugzilla.mozilla.org/latest/")
    bugzilla = ui.config("bzexport", "bugzilla", "https://bugzilla.mozilla.org/")
    username = ui.config("bzexport", "username", None)
    password = ui.config("bzexport", "password", None)

    auth = bzauth.get_auth(ui, bugzilla, profile, username, password)
    return (auth, api_server, bugzilla)