You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by "dreewh (via GitHub)" <gi...@apache.org> on 2025/06/18 17:58:04 UTC
[PR] Add source download and release notes links for sprint-security and redis plugins [grails-static-website]
dreewh opened a new pull request, #366:
URL: https://github.com/apache/grails-static-website/pull/366
on the download page.
Resolves: https://github.com/apache/grails-static-website/issues/365
--
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: commits-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add source download and release notes links for sprint-security and redis plugins [grails-static-website]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #366:
URL: https://github.com/apache/grails-static-website/pull/366#discussion_r2155219401
##########
buildSrc/src/main/groovy/org/grails/documentation/DownloadPage.groovy:
##########
@@ -62,13 +63,29 @@ class DownloadPage {
a(href: binaryUrl(version, 'grails-wrapper', '.sha512'), 'SHA512')
a(href: binaryUrl(version, 'grails-wrapper', '.asc'), 'ASC')
}
+ li {
+ a(href: sourceUrl(version, '', 'grails-spring-security', 'spring-security'), 'Grails Spring Security Plugin Source')
+ a(href: sourceUrl(version, '.sha512', 'grails-spring-security', 'spring-security'), 'SHA512')
+ a(href: sourceUrl(version, '.asc', 'grails-spring-security', 'spring-security'), 'ASC')
+ }
+ li {
+ a(href: sourceUrl('5.0.0-M4', '', 'grails-redis', 'redis'), 'Grails Redis 5.0.0-M4 Plugin Source')
+ a(href: sourceUrl('5.0.0-M4', '.sha512', 'grails-redis', 'redis'), 'SHA512')
+ a(href: sourceUrl('5.0.0-M4', '.asc', 'grails-redis', 'redis'), 'ASC')
Review Comment:
The version for the Grails Redis plugin is hardcoded to '5.0.0-M4'; consider using the `version` variable or passing the plugin version as a parameter to keep links in sync with the current release.
```suggestion
a(href: sourceUrl(version, '', 'grails-redis', 'redis'), "Grails Redis ${version} Plugin Source")
a(href: sourceUrl(version, '.sha512', 'grails-redis', 'redis'), 'SHA512')
a(href: sourceUrl(version, '.asc', 'grails-redis', 'redis'), 'ASC')
```
##########
buildSrc/src/main/groovy/org/grails/documentation/DownloadPage.groovy:
##########
@@ -25,12 +25,13 @@ import groovy.xml.MarkupBuilder
@CompileStatic
class DownloadPage {
- static String binaryUrl(String version, String artifact, String ext = '') {
- "https://www.apache.org/dyn/closer.lua/grails/core/${version}/distribution/apache-${artifact}-${version}-incubating-bin.zip${ext}?action=download"
+ static String binaryUrl(String version, String artifact, String ext = '', String directory = 'core') {
+ "https://www.apache.org/dyn/closer.lua/grails/${directory}/${version}/distribution/apache-${artifact}-${version}-incubating-bin.zip${ext}?action=download"
+
}
- static String sourceUrl(String version, String ext = '') {
- "https://www.apache.org/dyn/closer.lua/grails/core/${version}/sources/apache-grails-${version}-incubating-src.zip${ext}?action=download"
+ static String sourceUrl(String version, String ext = '', String artifact='grails', String directory = 'core') {
Review Comment:
[nitpick] The parameter order in `sourceUrl` (version, ext, artifact, directory) differs from `binaryUrl` (version, artifact, ext, directory). Aligning their signatures will reduce confusion and improve consistency.
```suggestion
static String sourceUrl(String version, String artifact = 'grails', String ext = '', String directory = 'core') {
```
##########
buildSrc/src/main/groovy/org/grails/documentation/DownloadPage.groovy:
##########
@@ -62,13 +63,29 @@ class DownloadPage {
a(href: binaryUrl(version, 'grails-wrapper', '.sha512'), 'SHA512')
a(href: binaryUrl(version, 'grails-wrapper', '.asc'), 'ASC')
}
+ li {
+ a(href: sourceUrl(version, '', 'grails-spring-security', 'spring-security'), 'Grails Spring Security Plugin Source')
+ a(href: sourceUrl(version, '.sha512', 'grails-spring-security', 'spring-security'), 'SHA512')
+ a(href: sourceUrl(version, '.asc', 'grails-spring-security', 'spring-security'), 'ASC')
+ }
+ li {
+ a(href: sourceUrl('5.0.0-M4', '', 'grails-redis', 'redis'), 'Grails Redis 5.0.0-M4 Plugin Source')
+ a(href: sourceUrl('5.0.0-M4', '.sha512', 'grails-redis', 'redis'), 'SHA512')
+ a(href: sourceUrl('5.0.0-M4', '.asc', 'grails-redis', 'redis'), 'ASC')
+ }
Review Comment:
[nitpick] The code for rendering plugin download entries is repetitive for each plugin. Consider extracting a helper method that generates these `<li>` blocks given plugin metadata to improve reuse and ease future additions.
```suggestion
renderPluginLi(html, version, 'grails-spring-security', 'spring-security', 'Grails Spring Security Plugin Source')
renderPluginLi(html, '5.0.0-M4', 'grails-redis', 'redis', 'Grails Redis 5.0.0-M4 Plugin Source')
```
--
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: commits-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add source download and release notes links for sprint-security and redis plugins [grails-static-website]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley merged PR #366:
URL: https://github.com/apache/grails-static-website/pull/366
--
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: commits-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org