# Path: utils/utils.py
# def base_url_and_api(direct_url):
#     try:
#         base_url = direct_url.rstrip('/') if direct_url else env_base_url()
#     except Exception:
#         print("*** ERROR: You must specify 'direct-url' if not running from Jenkins job", file=sys.stderr)
#         raise
# 
#     if base_url.startswith('http:') or base_url.startswith('https:'):
#         # Using jenkins_api
#         from .. import jenkins_api as api
#     else:
#         # Using script_api
#         from .. import script_api as api
# 
#     return base_url, api


from .utils import base_url_and_api
# Copyright (c) 2012 - 2017 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.



def set_build_description(
        description: str, replace: bool = False, separator: str = '\n',
        username: str = None, password: str = None,
        build_url: str = None, job_name: str = None, build_number: int = None,

# Path: utils/utils.py
# def base_url_and_api(direct_url):
#     try:
#         base_url = direct_url.rstrip('/') if direct_url else env_base_url()
#     except Exception:
#         print("*** ERROR: You must specify 'direct-url' if not running from Jenkins job", file=sys.stderr)
#         raise
# 
#     if base_url.startswith('http:') or base_url.startswith('https:'):
#         # Using jenkins_api
#         from .. import jenkins_api as api
#     else:
#         # Using script_api
#         from .. import script_api as api
# 
#     return base_url, api


# Path: utils/set_build_description.py
from .utils import base_url_and_api

# Copyright (c) 2012 - 2017 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.



def set_build_description(
        description: str, replace: bool = False, separator: str = '\n',
        username: str = None, password: str = None,
        build_url: str = None, job_name: str = None, build_number: int = None,

        direct_url: str = None):