-
-
Notifications
You must be signed in to change notification settings - Fork 961
#14316 Use local repo commands instead of the github api for Release Drop Down population #14834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 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
There was a problem hiding this 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.
grails-gradle/docs-core/src/main/groovy/grails/doc/dropdown/SoftwareVersion.groovy
Show resolved
Hide resolved
- Copied all code from AddReleaseDropDown (new file) to CreateReleaseDropDown (original) - Deleted AddReleaseDropDown - Updated references to dropdown task in build.gradle
- Create new subpackage `grails.doc.git.FetchTagsTask and put listRepoTags in it - Fix @TaskAction function name - Remove now unneeded api base url
…gardless of tag existence
`grails-doc` Gradle plugin was removed in apachegh-14834 (59bead0).
Summary
Replaces the GitHub API call with a local Git command to fetch version tags for the Releases drop down. Fixes #14316
Changes
minimumVersion
parameter for parsing the tags to limit the amount shown in the dropdown. This avoids the dropdown having all of these values:Edited
visitFile()
function inside ofFiles.walkFileTree()
to correctly copy the modified text over tomodified-guide/
. It seemed to be overwriting the new changes by copying the original file onto the target, but now the files undermodified-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 apatch
value when the data type matches. This avoids building versions like these:Let me know if there are any concerns!