How to use the changelog.Changelog.from_file function in changelog

To help you get started, we’ve selected a few changelog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mistio / mist-ee / changelog.py View on Github external
def main():
    args = parse_args()

    changelog = Changelog.from_file(args.file)

    if args.action == 'show':
        changelog.show(as_json=args.json)
    elif args.action == 'rewrite':
        changelog.to_file(args.file)
    elif args.action == 'extract':
        for version in changelog.versions:
            if version.name == args.version:
                print version.get_release_notes()
                break
        else:
            print >> sys.stderr, "ERROR: Couldn't find version '%s'." % (
                args.version)
            sys.exit(1)
    elif args.action == 'add':
        gitlab = GitlabRequest(url=args.gitlab_url, repo=args.repo,
github mistio / mist-ce / changelog.py View on Github external
def main():
    args = parse_args()

    changelog = Changelog.from_file(args.file)

    if args.action == 'show':
        changelog.show(as_json=args.json)
    elif args.action == 'rewrite':
        changelog.to_file(args.file)
    elif args.action == 'extract':
        for version in changelog.versions:
            if version.name == args.version:
                print version.get_release_notes()
                break
        else:
            print >> sys.stderr, "ERROR: Couldn't find version '%s'." % (
                args.version)
            sys.exit(1)
    elif args.action == 'add':
        gitlab = GitlabRequest(url=args.gitlab_url, repo=args.repo,