tasks/release.py
def _fetch_dependency_repo_version(
    repo_name,
    new_agent_version,
    max_agent_version,
    allowed_major_versions,
    compatible_version_re,
    github_token,
    check_for_rc,
):
    """
    Fetches the latest tag on a given repository whose version scheme matches the one used for the Agent,
    with the following constraints:
    - the tag must have a major version that's in allowed_major_versions
    - the tag must match compatible_version_re (the main usage is to restrict the compatible tags to the
      ones with the same minor version as the Agent)?

    If check_for_rc is true, a warning will be emitted if the latest version that satisfies
    the constraints is an RC. User confirmation is then needed to check that this is desired.
    """

    # Get the highest repo version that's not higher than the Agent version we're going to build
    # We don't want to use a tag on dependent repositories that is supposed to be used in a future
    # release of the Agent (eg. if 7.31.1-rc.1 is tagged on integrations-core while we're releasing 7.30.0).
    version = _get_highest_repo_version(
        github_token,
        repo_name,
        new_agent_version.prefix,
        compatible_version_re,
        allowed_major_versions,
        max_version=max_agent_version,
    )

    if check_for_rc and version.is_rc():
        if not yes_no_question(RC_TAG_QUESTION_TEMPLATE.format(repo_name, version), "orange", False):
            raise Exit("Aborting release.json update.", 1)

    print(TAG_FOUND_TEMPLATE.format(repo_name, version))
    return version

    Fetches the latest tag on a given repository whose version scheme matches the one used for the Agent,
    with the following constraints:
    - the tag must have a major version that's in allowed_major_versions
    - the tag must match compatible_version_re (the main usage is to restrict the compatible tags to the
      ones with the same minor version as the Agent)?

    If check_for_rc is true, a warning will be emitted if the latest version that satisfies
    the constraints is an RC. User confirmation is then needed to check that this is desired.
    


If check_for_rc is true, a warning will be emitted if the latest version that satisfies
the constraints is an RC. User confirmation is then needed to check that this is desired.
If check_for_rc is true a warning will be emitted if the latest version that satisfies the constraints is an RC . User confirmation is then needed to check that this is desired .
def _fetch_dependency_repo_version(
    repo_name,
    new_agent_version,
    max_agent_version,
    allowed_major_versions,
    compatible_version_re,
    github_token,
    check_for_rc,
):
    version = _get_highest_repo_version(
        github_token,
        repo_name,
        new_agent_version.prefix,
        compatible_version_re,
        allowed_major_versions,
        max_version=max_agent_version,
    )
    if check_for_rc and version.is_rc():
        if not yes_no_question(RC_TAG_QUESTION_TEMPLATE.format(repo_name, version), "orange", False):
            raise Exit("Aborting release.json update.", 1)
    print(TAG_FOUND_TEMPLATE.format(repo_name, version))
    return version
def _fetch_dependency_repo_version ( repo_name , new_agent_version , max_agent_version , allowed_major_versions , compatible_version_re , github_token , check_for_rc , ) : version = _get_highest_repo_version ( github_token , repo_name , new_agent_version . prefix , compatible_version_re , allowed_major_versions , max_version = max_agent_version , ) if check_for_rc and version . is_rc ( ) : if not yes_no_question ( RC_TAG_QUESTION_TEMPLATE . format ( repo_name , version ) , "orange" , False ) : raise Exit ( "Aborting release.json update." , 1 ) print ( TAG_FOUND_TEMPLATE . format ( repo_name , version ) ) return version
Fetches the latest tag on a given repository whose version scheme matches the one used for the Agent,
with the following constraints:
 the tag must have a major version that's in allowed_major_versions
 the tag must match compatible_version_re (the main usage is to restrict the compatible tags to the
ones with the same minor version as the Agent)?
Fetches the latest tag on a given repository whose version scheme matches the one used for the Agent with the following constraints : the tag must have a major version that ' s in allowed_major_versions the tag must match compatible_version_re ( the main usage is to restrict the compatible tags to the ones with the same minor version as the Agent ) ?
"""
    Fetches the latest tag on a given repository whose version scheme matches the one used for the Agent,
    with the following constraints:
    - the tag must have a major version that's in allowed_major_versions
    - the tag must match compatible_version_re (the main usage is to restrict the compatible tags to the
      ones with the same minor version as the Agent)?

    If check_for_rc is true, a warning will be emitted if the latest version that satisfies
    the constraints is an RC. User confirmation is then needed to check that this is desired.
    """ # Get the highest repo version that's not higher than the Agent version we're going to build # We don't want to use a tag on dependent repositories that is supposed to be used in a future # release of the Agent (eg. if 7.31.1-rc.1 is tagged on integrations-core while we're releasing 7.30.0).
repo_name
new_agent_version
max_agent_version
allowed_major_versions
compatible_version_re
github_token
check_for_rc