You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "janhoy (via GitHub)" <gi...@apache.org> on 2025/06/19 09:34:13 UTC
Re: [PR] SOLR-17619 add logchange plugin [solr]
janhoy commented on code in PR #3044:
URL: https://github.com/apache/solr/pull/3044#discussion_r2156533498
##########
gradle/changelog.gradle:
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+logchange {
+ taskPrefix = "logchange"
+ rootPath = "."
+ inputDir = "changelog"
+ unreleasedVersionDir = "unreleased"
+ outputFile = "CHANGELOG.md"
+ configFile = "logchange-config.yml"
+ generateChangesXml = false
+ xmlOutputFile = "changes.xml"
+}
+
+task generateChangeYaml {
+ description = 'Generates a change/log description file (YAML)'
+ doLast {
+ def gitUserName = 'git config user.name'.execute().text.trim()
+ def gitBranch = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim()
+ def jiraMatcher = gitBranch =~ /SOLR-\d+/
+ def jiraRef = jiraMatcher ? jiraMatcher[0] : "SOLR-XXXX"
+ def fileName = "changelog/unreleased/${gitBranch}.yml"
+ def file = new File(fileName)
+ file.parentFile.mkdirs()
+ file.text = """# logchange format: https://github.com/logchange/logchange#yaml-format
+type: other # added/changed/deprecated/removed/fixed/security/dependency_update/other
+links:
+ - name: ${jiraRef}
+title: TITLE HERE
Review Comment:
If we match JIRA issue, could we pull JIRA title as title in the template? :)
##########
gradle/changelog.gradle:
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+logchange {
+ taskPrefix = "logchange"
+ rootPath = "."
+ inputDir = "changelog"
+ unreleasedVersionDir = "unreleased"
+ outputFile = "CHANGELOG.md"
+ configFile = "logchange-config.yml"
+ generateChangesXml = false
+ xmlOutputFile = "changes.xml"
+}
+
+task generateChangeYaml {
+ description = 'Generates a change/log description file (YAML)'
+ doLast {
+ def gitUserName = 'git config user.name'.execute().text.trim()
+ def gitBranch = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim()
+ def jiraMatcher = gitBranch =~ /SOLR-\d+/
+ def jiraRef = jiraMatcher ? jiraMatcher[0] : "SOLR-XXXX"
+ def fileName = "changelog/unreleased/${gitBranch}.yml"
Review Comment:
Logchange now supports versioned unreleased folders like `changelog/unreleased-9.9.0/`, which would give us better control over intended target version.
It would be nice if our `main` branch could have a generated `CHANGES.md` that reflects the current state of development, both released and unreleased...
##########
gradle/changelog.gradle:
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+logchange {
+ taskPrefix = "logchange"
+ rootPath = "."
+ inputDir = "changelog"
+ unreleasedVersionDir = "unreleased"
+ outputFile = "CHANGELOG.md"
+ configFile = "logchange-config.yml"
+ generateChangesXml = false
+ xmlOutputFile = "changes.xml"
+}
+
+task generateChangeYaml {
+ description = 'Generates a change/log description file (YAML)'
+ doLast {
+ def gitUserName = 'git config user.name'.execute().text.trim()
+ def gitBranch = 'git rev-parse --abbrev-ref HEAD'.execute().text.trim()
+ def jiraMatcher = gitBranch =~ /SOLR-\d+/
+ def jiraRef = jiraMatcher ? jiraMatcher[0] : "SOLR-XXXX"
+ def fileName = "changelog/unreleased/${gitBranch}.yml"
+ def file = new File(fileName)
+ file.parentFile.mkdirs()
+ file.text = """# logchange format: https://github.com/logchange/logchange#yaml-format
+type: other # added/changed/deprecated/removed/fixed/security/dependency_update/other
+links:
+ - name: ${jiraRef}
+title: TITLE HERE
+authors:
+ - name: ${gitUserName}
+"""
Review Comment:
`authors` supports `nick` and `url` as well. Perhaps we could tell users to add some lines to their `<solr-checkout>/gradle.properties` if they want to customize this?
##########
gradle/libs.versions.toml:
##########
@@ -146,6 +146,7 @@ langchain4j = "0.35.0"
link-checker = "1.4.2"
littlerobots-versioncatalogupdate = "0.8.4"
lmax-disruptor = "3.4.4"
+logchange = "1.16.5"
Review Comment:
```suggestion
logchange = "1.19.4"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org