Skip to content

Conversation

JudeRV
Copy link
Contributor

@JudeRV JudeRV commented Jun 27, 2025

Summary

Replaces the GitHub API call with a local Git command to fetch version tags for the Releases drop down. Fixes #14316

Changes

  • Added a minimumVersion parameter for parsing the tags to limit the amount shown in the dropdown. This avoids the dropdown having all of these values:
Detected Project Version: 7.0.0-M4 and Software Versions: 7.0.0-M4,7.0.0-M3,7.0.0-M1,6.2.3,6.2.2,6.2.1,6.2.0,6.1.3,6.1.2,6.1.1,6.1.0,6.0.0,6.0.0-RC1,6.0.0-M4,6.0.0-M3,6.0.0-M2,6.0.0-M1,5.3.6,5.3.5,5.3.4,5.3.3,5.3.2,5.3.1,5.3.0,5.2.6,5.2.5,5.2.4,5.2.3,5.2.2,5.2.1,5.2.0,5.1.10,5.1.9,5.1.8,5.1.7,5.1.6,5.1.5,5.1.4,5.1.3,5.1.2,5.1.1,5.1.0,5.0.3,5.0.2,5.0.1,5.0.0,5.0.0-RC4,5.0.0-RC3,5.0.0.RC2,5.0.0.RC1,5.0.0-M4,5.0.0-M3,5.0.0-M2,5.0.0-M1,4.1.4,4.1.3,4.1.2,4.1.1,4.1.0,4.1.0.M5,4.1.0.M4,4.1.0.M3,4.1.0.M2,4.1.0.M1,4.0.13,4.0.12,4.0.11,4.0.10,4.0.9,4.0.8,4.0.7,4.0.6,4.0.5,4.0.4,4.0.3,4.0.2,4.0.1,4.0.0,4.0.0.RC2,4.0.0.RC1,4.0.0-M2,4.0.0-M1,3.3.18,3.3.17,3.3.16,3.3.15,3.3.14,3.3.13,3.3.12,3.3.11,3.3.10,3.3.9,3.3.8,3.3.7,3.3.6,3.3.5,3.3.4,3.3.3,3.3.2,3.3.1,3.3.0,3.3.0.RC1,3.3.0.M2,3.3.0.M1,3.2.13,3.2.12,3.2.11,3.2.10,3.2.9,3.2.8,3.2.7,3.2.6,3.2.5,3.2.4,3.2.3,3.2.2,3.2.1,3.2.0,3.2.0.RC2,3.2.0.RC1,3.2.0.M2,3.2.0.M1,3.1.16,3.1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null
  • Edited visitFile() function inside of Files.walkFileTree() to correctly copy the modified text over to modified-guide/. It seemed to be overwriting the new changes by copying the original file onto the target, but now the files under modified-guide/ show correct HTML.

  • Added modified-guide/index.html to the list of files for which the dropdown should be generated, which was the behavior prior to a recent change.

  • Edited SoftwareVersion.groovy to only initialize a patch value when the data type matches. This avoids building versions like these:
    image

Let me know if there are any concerns!

JudeRV added 5 commits June 27, 2025 01:46
- Rewrote listRepoTags to use Git commands instead of GitHub API
- Refactored visitFile to generate output without copying files
- Rewrote parseSoftwareVersions to work with new input format & add optional minimum value
- Only assign patch values for integers, prevents tags such as 0.2.RC2
- Fixes error thrown by AddReleaseDropDown.parseSoftwareVersions
- Include single.html and index.html in new corrected paths to add dropdown to
@jamesfredley jamesfredley requested a review from jdaugherty June 27, 2025 18:46
Copy link
Contributor

@jdaugherty jdaugherty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution. After reviewing this, it looks like this is a bigger change to ensure we're using task configuration avoidance / lazy properties & cacheing. I've tried to make comments inline, but if you'd like to pair on some of this, I can make time given the scope of the changes required.

@jamesfredley jamesfredley self-requested a review June 27, 2025 20:11
@jdaugherty jdaugherty merged commit b84ec43 into apache:7.0.x Jul 8, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache Grails Jul 8, 2025
matrei added a commit to matrei/grails-core that referenced this pull request Sep 5, 2025
`grails-doc` Gradle plugin was removed in apachegh-14834
(59bead0).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Use local repo commands instead of the github api for Release Drop Down population
3 participants