Skip to content
Open
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions src/reprepro_updater/diff_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ def get_packagefile_from_url(url):
return package_file


def conditional_markdown_package_homepage_link(package, package_file):
def conditional_markdown_package_homepage_link(package, package_file, rosdistro=None):
if 'Homepage' in package_file[package]:
return "[%s](%s)" % (package, package_file[package]['Homepage'])
else:
return package
return "[%s](https://index.ros.org/p/%s/#%s)" % (package, package, rosdistro)
Copy link
Member

@christophebedard christophebedard Oct 14, 2025

Choose a reason for hiding this comment

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

Is package here $pkg_name or ros-$distro-$pkg_name?

Based on a typical output we use (example from a recent Jazzy sync announcement), this should be ros-$distro-${pkg-name}.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, you're right.

I was making ros-infrastructure/bloom#754 as a complement to get the info into more places, but maybe that would just be a better replacement going further upstream.



def compute_annoucement(rosdistro, pf_old, pf_new):
Expand Down Expand Up @@ -117,21 +117,21 @@ def compute_annoucement(rosdistro, pf_old, pf_new):
out += "### Added Packages [%s]:\n\n" % len(added_packages)
for p in sorted(added_packages):
out += " * %s: %s\n" % \
(conditional_markdown_package_homepage_link(p, new_packages),
(conditional_markdown_package_homepage_link(p, new_packages, rosdistro),
core_version(new_packages[p]['Version']))
out += "\n"

out += "### Updated Packages [%s]:\n\n" % len(updated_packages)
for p in sorted(updated_packages):
out += " * %s: %s -> %s\n" % \
(conditional_markdown_package_homepage_link(p, new_packages),
(conditional_markdown_package_homepage_link(p, new_packages, rosdistro),
core_version(old_packages[p]['Version']),
core_version(new_packages[p]['Version']))
out += "\n"

out += "### Removed Packages [%s]:\n\n" % len(removed_packages)
for p in sorted(removed_packages):
out += "- %s\n" % (conditional_markdown_package_homepage_link(p, old_packages),)
out += "- %s\n" % (conditional_markdown_package_homepage_link(p, old_packages, rosdistro),)
out += "\n"

out += \
Expand Down