# Path: releasetool/commands/common.py
# class TagContext(GitHubContext):
#     release_pr: Optional[dict] = None
#     release_tag: Optional[str] = None
#     release_version: Optional[str] = None
#     github_release: Optional[dict] = None
#     kokoro_job_name: Optional[str] = None
#     fusion_url: Optional[str] = None
#     token: Optional[str] = None
# 
# Path: releasetool/commands/tag/python.py
# def determine_release_pr(ctx: TagContext) -> None:
# def determine_release_tag(ctx: TagContext) -> None:
# def determine_package_version(ctx: TagContext) -> None:
# def get_release_notes(ctx: TagContext) -> None:
# def _get_latest_release_notes(ctx: TagContext, changelog: str):
# def create_release(ctx: TagContext) -> None:
# def kokoro_job_name(upstream_repo: str, package_name: str) -> Union[str, None]:
# def package_name(pull: dict) -> Union[str, None]:
# def tag(ctx: TagContext = None) -> TagContext:


import getpass
import re
import click
import releasetool.commands.common
from typing import Union
from releasetool.commands.common import TagContext
from releasetool.commands.tag import python


def kokoro_job_name(upstream_repo: str, package_name: str) -> Union[str, None]:
    """Return the Kokoro job name.

    Args:
        upstream_repo (str): The GitHub repo in the form of `<owner>/<repo>`
        package_name (str): The name of package to release

    Returns:
        The name of the Kokoro job to trigger or None if there is no job to trigger
    """
    return f"cloud-devrel/client-libraries/{package_name}/release"


def package_name(pull: dict) -> Union[str, None]:
    return None


def tag(ctx: TagContext = None) -> TagContext:
    if not ctx:
        ctx = TagContext()

    if ctx.interactive:
        click.secho(f"o/ Hey, {getpass.getuser()}, let's tag a release!", fg="magenta")

    if ctx.github is None:
        releasetool.commands.common.setup_github_context(ctx)

    if ctx.release_pr is None:

# Path: releasetool/commands/common.py
# class TagContext(GitHubContext):
#     release_pr: Optional[dict] = None
#     release_tag: Optional[str] = None
#     release_version: Optional[str] = None
#     github_release: Optional[dict] = None
#     kokoro_job_name: Optional[str] = None
#     fusion_url: Optional[str] = None
#     token: Optional[str] = None
# 
# Path: releasetool/commands/tag/python.py
# def determine_release_pr(ctx: TagContext) -> None:
# def determine_release_tag(ctx: TagContext) -> None:
# def determine_package_version(ctx: TagContext) -> None:
# def get_release_notes(ctx: TagContext) -> None:
# def _get_latest_release_notes(ctx: TagContext, changelog: str):
# def create_release(ctx: TagContext) -> None:
# def kokoro_job_name(upstream_repo: str, package_name: str) -> Union[str, None]:
# def package_name(pull: dict) -> Union[str, None]:
# def tag(ctx: TagContext = None) -> TagContext:


# Path: releasetool/commands/tag/python_tool.py
import getpass
import re
import click
import releasetool.commands.common
from typing import Union
from releasetool.commands.common import TagContext
from releasetool.commands.tag import python



def kokoro_job_name(upstream_repo: str, package_name: str) -> Union[str, None]:
    """Return the Kokoro job name.

    Args:
        upstream_repo (str): The GitHub repo in the form of `<owner>/<repo>`
        package_name (str): The name of package to release

    Returns:
        The name of the Kokoro job to trigger or None if there is no job to trigger
    """
    return f"cloud-devrel/client-libraries/{package_name}/release"


def package_name(pull: dict) -> Union[str, None]:
    return None


def tag(ctx: TagContext = None) -> TagContext:
    if not ctx:
        ctx = TagContext()

    if ctx.interactive:
        click.secho(f"o/ Hey, {getpass.getuser()}, let's tag a release!", fg="magenta")

    if ctx.github is None:
        releasetool.commands.common.setup_github_context(ctx)

    if ctx.release_pr is None:

        python.determine_release_pr(ctx)