Create a link to compare tags in Gitlab markdown
Asked Answered
F

1

7

We keep a changelog.md in the root of our gitlab projects and would like to include a link in each version tag to compare it to the previous tag.

The link needs to be e.g https://gitlab.company.com/group/project/compare/v15.4.0...v15.3.0

All relative links in markdown that I've tried end up relative to the current branch (including master) e.g. [v15.4.0](compare/v15.3.0...v15.4.0), [v15.4.0](../compare/v15.3.0...v15.4.0) and [v15.4.0](../../compare/v15.3.0...v15.4.0) all end up with the link https://gitlab.company.com/group/project/branch/compare/v15.3.0...v15.4.0

Is there a way to create a link relative to the project root rather than the current branch?

Faizabad answered 25/8, 2016 at 12:24 Comment(2)
Could you solve this problem? I have the same problem, all my changelog links to compare tags version are broken. I have researched in gitlab doc but nothing.Portia
Unfortunately we have not found a solution yet @BorjaTur. I will update here if we do!Faizabad
F
0

At least as of v12.6.4-ee the [v15.4.0](../compare/v15.3.0...v15.4.0) syntax generates the correct comparison link.

I have been unable to find an issue etc where this behaviour was changed so unknown exactly which version it was in.

Faizabad answered 22/1, 2020 at 11:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.