Skip to content

Commit 9121750

Browse files
committed
Support release notes creation for milestones
Signed-off-by: Kai Kreuzer <kai@openhab.org>
1 parent d7a1b5f commit 9121750

2 files changed

Lines changed: 21 additions & 9 deletions

File tree

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ task buildChangelog {
1818

1919
// Get parameters from system properties - fail if not provided
2020
def openHABMilestone = project.findProperty('milestone')
21-
def openHABPatch = project.findProperty('version')
21+
def openHABVersion = project.findProperty('version')
2222
def fromDate = project.findProperty('fromDate')
2323
def toDate = project.findProperty('toDate')
2424

2525
// Validate that all required parameters are provided
2626
if (!openHABMilestone) {
2727
throw new GradleException("Required property 'milestone' not provided. Use -Pmilestone=<value>")
2828
}
29-
if (!openHABPatch) {
29+
if (!openHABVersion) {
3030
throw new GradleException("Required property 'version' not provided. Use -Pversion=<value>")
3131
}
3232
if (!fromDate) {
@@ -92,14 +92,27 @@ task buildChangelog {
9292
category.repos.each { repo ->
9393

9494
def curlURL = ""
95-
// Choose correct backport label depending on version (4.x uses 'backported4')
96-
def labelName = "backported"
97-
if (openHABPatch?.trim()?.startsWith("4.")) {
98-
labelName = "backported4"
99-
}
100-
def labelString = "%20label:%22${labelName}%22%20-label:%22regression%22"
10195
def repoName = repo.name
10296
def addonName = repo.addonName
97+
98+
// For milestone releases, don't use backported labels
99+
// For patch releases, use appropriate backported label
100+
def labelString = ""
101+
102+
// Detect if this is a milestone release (version follows pattern a.b.c.Mx)
103+
def isMilestoneRelease = openHABVersion?.matches(/\d+\.\d+\.\d+\.M\d+/)
104+
105+
if (isMilestoneRelease) {
106+
// Milestone release: no backported labels, only exclude regression
107+
labelString = "%20-label:%22regression%22"
108+
} else {
109+
// Patch release: use backported labels
110+
def labelName = "backported"
111+
if (openHABVersion?.trim()?.startsWith("4.")) {
112+
labelName = "backported4"
113+
}
114+
labelString = "%20label:%22${labelName}%22%20-label:%22regression%22"
115+
}
103116

104117
def searchesLeft = 1
105118
def pageNumber = 1

launch/settings.gradle

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)