Exemplo n.º 1
0
def main():
    args = docopt.docopt(__doc__, version=__version__)
    # Convert the repository name to an absolute path
    repo = os.path.abspath(args['--repo'])

    repository = GitRepository(repo)
    presenter = MarkdownPresenter()
    title = args['--title']
    description = args['--description']
    changelog = generate_changelog(repository, presenter, title, description)

    with open(args['--output'], 'w') as f:
        f.write(changelog)
Exemplo n.º 2
0
def main(
    path_repo,
    title,
    description,
    output,
    remote,
    latest_version: str,
    unreleased: bool,
    template,
    diff_url,
    issue_url,
    issue_pattern,
    tag_prefix,
    stdout: bool,
    tag_pattern: Optional[str],
    starting_commit: str,
    stopping_commit: str,
    debug: bool,
):
    if debug:
        logging.basicConfig(level=logging.DEBUG)
        logging.debug("Logging level has been set to DEBUG")

    # Convert the repository name to an absolute path
    repo = os.path.abspath(path_repo)

    repository = GitRepository(
        repo,
        latest_version=latest_version,
        skip_unreleased=not unreleased,
        tag_prefix=tag_prefix,
        tag_pattern=tag_pattern,
    )
    presenter = MarkdownPresenter(template=template)
    changelog = generate_changelog(
        repository,
        presenter,
        title,
        description,
        remote=remote,
        issue_pattern=issue_pattern,
        issue_url=issue_url,
        diff_url=diff_url,
        starting_commit=starting_commit,
        stopping_commit=stopping_commit,
    )

    if stdout:
        print(changelog)
    else:
        output.write(changelog)
Exemplo n.º 3
0
def main(
    repo,
    title,
    description,
    output,
    remote,
    latest_version: str,
    unreleased: bool,
    diff_url,
    issue_url,
    issue_pattern,
    tag_prefix,
    stdout: bool,
    tag_pattern: Optional[str],
    starting_commit: str,
    stopping_commit: str,
):
    # Convert the repository name to an absolute path
    repo = os.path.abspath(repo)

    repository = GitRepository(
        repo,
        latest_version=latest_version,
        skip_unreleased=not unreleased,
        tag_prefix=tag_prefix,
        tag_pattern=tag_pattern,
    )
    presenter = MarkdownPresenter()
    changelog = generate_changelog(
        repository,
        presenter,
        title,
        description,
        remote=remote,
        issue_pattern=issue_pattern,
        issue_url=issue_url,
        diff_url=diff_url,
        starting_commit=starting_commit,
        stopping_commit=stopping_commit,
    )

    if stdout:
        print(changelog)
    else:
        output.write(changelog)