Skip to content
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

feat(softwareCenter): add release note URLs for GitHub code repositories #795

Merged
merged 16 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/imageroot/usr/local/agent/pypkg/cluster/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ def _get_available_modules(rdb):
continue # skip duplicated images from lower priority modules
modules[rmod["source"]] = rmod
rmod['versions'].sort(key=lambda v: _parse_version_object(v["tag"]), reverse=True)
# Set the general release note URL if the code URL is a GitHub repository
if rmod['docs']['code_url'].startswith("https://github.com/") and 'relnotes_url' not in rmod['docs']:
rmod['docs']['relnotes_url'] = f"{rmod['docs']['code_url']}/releases"

# Integrate the available set with instances that do not belong to any
# repository. They can be found in the "installed" dict:
for module_source, module_instances in list_installed(rdb).items():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"docs": {
"documentation_url": "https://docs.nethserver.org",
"bug_url": "https://github.com/NethServer/dev",
"code_url": "https://github.com/NethServer/"
"code_url": "https://github.com/NethServer/",
"relnotes_url": "https://github.com/NethServer/ns8-kickstart/releases"
},
"source": "ghcr.io/nethserver/dokuwiki",
"versions": [
Expand Down Expand Up @@ -130,6 +131,10 @@
"code_url": {
"type": "uri",
"description": "Link to the source code repository"
},
"relnotes_url": {
"type": "uri",
Copy link
Member

Choose a reason for hiding this comment

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

I'm afraid this type is not defined in draft-07 and we must fix it here and elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it should be good

"description": "Optional link to the application release notes"
}
},
"required": [
Expand Down