How to use the changelog.GitlabRequest 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
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,
                               token=args.token)
        now = datetime.datetime.now()
        version = Version(args.version,
                          int(now.day), MONTHS[now.month - 1], int(now.year))
        last_version = None
        since = None
        if changelog.versions:
            last_version = changelog.versions[0]
            print >> sys.stderr, "INFO: Last version is '%s'." % (
                last_version.name)
            try:
                last_tag = gitlab.get(
                    'repository/tags/%s' % last_version.name
                )
            except:
                print >> sys.stderr, ("ERROR: Can't find previous release "
github mistio / mist-ce / changelog.py View on Github external
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,
                               token=args.token)
        now = datetime.datetime.now()
        version = Version(args.version,
                          int(now.day), MONTHS[now.month - 1], int(now.year))
        last_version = None
        since = None
        if changelog.versions:
            last_version = changelog.versions[0]
            print >> sys.stderr, "INFO: Last version is '%s'." % (
                last_version.name)
            try:
                last_tag = gitlab.get(
                    'repository/tags/%s' % last_version.name
                )
            except:
                print >> sys.stderr, ("ERROR: Can't find previous release "