How to use the changelog.Change.from_string 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
assert match, "Invalid version header '%s'" % lines[0]
        name, day, month, year = match.groups()

        lines = crop_line_padding(lines[1:])
        notes = []
        for i, line in enumerate(lines):
            if not re.match(r'^###\s*changes\s*$', line, re.IGNORECASE):
                notes.append(line)
            else:
                break
        notes = '\n'.join(notes)
        lines = filter(None, crop_line_padding(lines[i+1:]))

        version = cls(name, int(day), month, int(year), notes)
        for line in lines:
            version.changes.append(Change.from_string(line))
        return version
github mistio / mist-ce / changelog.py View on Github external
assert match, "Invalid version header '%s'" % lines[0]
        name, day, month, year = match.groups()

        lines = crop_line_padding(lines[1:])
        notes = []
        for i, line in enumerate(lines):
            if not re.match(r'^###\s*changes\s*$', line, re.IGNORECASE):
                notes.append(line)
            else:
                break
        notes = '\n'.join(notes)
        lines = filter(None, crop_line_padding(lines[i + 1:]))

        version = cls(name, int(day), month, int(year), notes)
        for line in lines:
            version.changes.append(Change.from_string(line))
        return version