build-collection.sh: Rename base README.md to make it invisible for AAH#1411
Open
t-woerner wants to merge 1 commit intofreeipa:masterfrom
Open
build-collection.sh: Rename base README.md to make it invisible for AAH#1411t-woerner wants to merge 1 commit intofreeipa:masterfrom
t-woerner wants to merge 1 commit intofreeipa:masterfrom
Conversation
AAH and also Galaxy are automatically trying to render the base README.md file in the collection even if "readme" is set to another file in galaxy.yml. Fixes: 1) README.md is renamed to README-COLLECTION.md 2) New README.md is generated with information about the rename and also pointing to the README-COLLECTION.md file in the collection and also the upstream documentation (versioned and latest). 3) Upstream "documentation" in galaxy.yml set to new README.md file.
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
mv README.md README-COLLECTION.mdcall assumesREADME.mdis always present; consider guarding it with a file existence check or failing with a clearer error to avoid unexpected build-time errors in edge cases. - Updating
readmeanddocumentationingalaxy.ymlwithsed -i 's/.../...'will silently do nothing if the keys are missing or formatted differently; consider a more robust approach (e.g., anchoring on^readme:/^documentation:or using a YAML-aware tool) to avoid partially updated metadata.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `mv README.md README-COLLECTION.md` call assumes `README.md` is always present; consider guarding it with a file existence check or failing with a clearer error to avoid unexpected build-time errors in edge cases.
- Updating `readme` and `documentation` in `galaxy.yml` with `sed -i 's/.../...'` will silently do nothing if the keys are missing or formatted differently; consider a more robust approach (e.g., anchoring on `^readme:` / `^documentation:` or using a YAML-aware tool) to avoid partially updated metadata.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AAH and also Galaxy are automatically trying to render the base README.md file in the collection even if "readme" is set to another file in galaxy.yml.
Fixes:
pointing to the README-COLLECTION.md file in the collection and also
the upstream documentation (versioned and latest).
Summary by Sourcery
Adjust collection build script to rename the original README to an internal collection README and generate a new top-level README to satisfy AAH/Galaxy rendering behavior while updating galaxy.yml metadata accordingly.
Enhancements:
Documentation: