mirror of
https://github.com/sparkle-project/Sparkle.git
synced 2025-11-01 15:34:38 +00:00
30361b0128
This bot has owner access to the repo and should be able to push changes to protected branches, as long as the workflows are being ran from trusted branches / remotes. Also extract changelog and use it for the draft.
24 lines
717 B
Python
Executable File
24 lines
717 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os, sys
|
|
|
|
# Ignore the first version line starting with # x.y.z..
|
|
# and print everything until the second version line starting with # x.y.z..
|
|
|
|
hit_first_changelog_note = False
|
|
with open("CHANGELOG", "r") as changelog_file:
|
|
for line in changelog_file:
|
|
if line.startswith("#"):
|
|
if hit_first_changelog_note:
|
|
# We are done with printing changes
|
|
break
|
|
else:
|
|
# We haven't hit an important changelog line yet, so continue
|
|
continue
|
|
|
|
if not hit_first_changelog_note and len(line.strip()) == 0:
|
|
continue
|
|
|
|
hit_first_changelog_note = True
|
|
sys.stdout.write(line)
|