(old_version: str, new_version: str)
return "patch"
Determine patch, like Dependabot.

    https://github.com/dependabot/dependabot-core/blob/998de3be7811956354aea077ecb180831e24012c/common/lib/dependabot/pull_request_creator/labeler.rb#L92-L114
Determine patch, like Dependabot.
Determine patch like Dependabot .
def _compare_versions(old_version: str, new_version: str) -> MatchType | None:
    """
    Determine patch, like Dependabot.

    https://github.com/dependabot/dependabot-core/blob/998de3be7811956354aea077ecb180831e24012c/common/lib/dependabot/pull_request_creator/labeler.rb#L92-L114
    """
    old_version_parts = _parse_version_simple(old_version)
    new_version_parts = _parse_version_simple(new_version)

    for part in new_version_parts[:3] + old_version_parts[:3]:
        try:
            int(part)
        except ValueError:
            return None

    if _get_or_none(new_version_parts, 0) != _get_or_none(old_version_parts, 0):
        return "major"
    if _get_or_none(new_version_parts, 1) != _get_or_none(old_version_parts, 1):
        return "minor"
    return "patch"
def _compare_versions ( old_version : str , new_version : str ) -> MatchType | None : old_version_parts = _parse_version_simple ( old_version ) new_version_parts = _parse_version_simple ( new_version ) for part in new_version_parts [ : 3 ] + old_version_parts [ : 3 ] : try : int ( part ) except ValueError : return None if _get_or_none ( new_version_parts , 0 ) != _get_or_none ( old_version_parts , 0 ) : return "major" if _get_or_none ( new_version_parts , 1 ) != _get_or_none ( old_version_parts , 1 ) : return "minor" return "patch"