Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2021-07-24 17:53:35 +0300
committerRobert Adam <dev@robert-adam.de>2021-07-24 17:53:35 +0300
commit3c3af619c06e3970f186955100fb8deabaaf2f24 (patch)
treef96eb40623e6b985d27f154762b47d6aa8b8086c /scripts
parenta3e3d8ccb2a48dec0259b6b15fadbde4b6f59f61 (diff)
MAINT: Make changelog script work with backports
Merge commits of backports follow a little different pattern than regular merge commits. This has to be accounted for in the script generating the changelog.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generateChangelog.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/generateChangelog.py b/scripts/generateChangelog.py
index 2bcaa13f4..507c3626c 100755
--- a/scripts/generateChangelog.py
+++ b/scripts/generateChangelog.py
@@ -38,6 +38,7 @@ def main():
args = parser.parse_args()
mergeCommitPattern = re.compile("^([0-9a-f]+)\s*[Mm]erge\s.+?#(\d+):?\s*(.+)$", re.MULTILINE)
+ backportCommitPattern = re.compile("^[Bb]ackport\s*\"(.*)\".*$")
commits = cmd(["git", "log" ,"--format=oneline", "--date=short", "{}..{}".format(args.FROM_TAG, args.TO_TAG)]).split("\n")
@@ -60,6 +61,11 @@ def main():
prNumber = match.group(2)
commitTitle = match.group(3)
+ backportMatch = re.match(backportCommitPattern, commitTitle)
+ if backportMatch:
+ # This commit is a backport commit where the actual commit title is the bit in the quotes
+ commitTitle = backportMatch.group(1)
+
try:
commit = CommitMessage(commitTitle)