While it is easy enough to change, we could in case of Drupal append it with the current branch, for example:
https://git.drupalcode.org/project/cer/-/tree/8.x-4.x
versus currently:
https://git.drupalcode.org/project/cer

To check if the path has the same structure on other projects in GitLab, GitHub, Bitbucket, etc. In any case, it is wise to built-in a fallback that returns to the short URL in case appending returns a "Page not found" (404).

Comments

lolandese created an issue. See original summary.

lolandese’s picture

GitHub uses https://github.com/palantirnet/drupal-rector/tree/docs without the dash. Using it returns a 404.

Instead GitLab accepts both, so the URL without the dash seems to be commonly accepted between different platforms:
https://git.drupalcode.org/project/cer/tree/8.x-4.x

On Bitbucket it is different:
https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/src/Examples/

lolandese’s picture

Status: Active » Needs review
StatusFileSize
new12.17 KB

  • lolandese committed 0b1c847 on 8.x-1.x
    Issue #3144050 by lolandese: Link to the remote goes to default branch...
lolandese’s picture

Status: Needs review » Fixed
lolandese’s picture

Status: Fixed » Needs work

Adding the tree should only be applied to the link to the remote tree, NOT the commits. To correct.

lolandese’s picture

Status: Needs work » Needs review
StatusFileSize
new2.39 KB

  • lolandese committed d92ea45 on 8.x-1.x
    Issue #3144050 by lolandese: Correction, leave alone the links to the...
lolandese’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.