updates: Provide a link to the Gitlab version comparison page for modules in the report

Created on 4 August 2023, 11 months ago
Updated 16 August 2023, 10 months ago

Problem/Motivation

On the Update report page, it'd be useful to have a link to view the code changes between two the installed and recommended versions.

e.g. an update for the masquerade module can provide a link to https://git.drupalcode.org/project/masquerade/-/compare/8.x-2.0-rc1...8....

Steps to reproduce

Install the update module, and view /admin/modules/update where a module update is available.

Proposed resolution

Provide a link under the "Recommended version" column to the Gitlab version comparsion/diff page.

We can make the URL configurable, but probably isn't necessary, initial solution is something along the lines of:

$diff_link = sprintf('https://git.drupalcode.org/project/%s/-/compare/%s...%s', $project['name'], $project['existing_version'], $project['recommended']);

But this would also work (allowing individual sites to override as necessary):

$diff_link = strtr(Settings::get('update.diff_url', 'https://git.drupalcode.org/project/@project/-/compare/@existing_version...@recommended_version'), [
  '@project' => $project['name'],
  '@existing_version' => $project['existing_version'],
  '@recommended_version' => $project['recommended'],
]);

We could also decide to hide this behind a configuration if it's not necessary for some sites.

Remaining tasks

User interface changes

There'll be a new diff URL on the update reports page.

API changes

N/A

Data model changes

N/A

Release notes snippet

TBD.

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
UpdateΒ  β†’

Last updated about 12 hours ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @tedbow
  • πŸ‡ΊπŸ‡ΈUnited States @dww
Created by

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024