Skip to content

Add GitLab compare link to the summary table - #8

Merged
lesnik512 merged 1 commit into
mainfrom
compare-link
Sep 30, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
compare-link

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Adds a Compare column after Pending in the summary table. It links to GitLab's compare view, running from production to the tag that will ship.

  • From: the production ref if it was deployed from a tag, otherwise the production SHA (labelled with the first 8 characters).
  • To: the newest tag among the pending rows. In a --jira report, release.tag instead.
  • Empty: when there is no production deployment, no tag in range, or the service failed to collect.
  • URL: {project_url}/-/compare/{from}...{to}, the base-first form GitLab's docs show (main...feature-branch). Ref names go through urllib.parse.quote, so / is kept and # becomes %23.

Why these choices

  • Label. The link is labelled from...tag rather than being attached to the "N changes" count. The count runs to the default-branch head, and the link stops at the tag.
  • Tag detection. GitLab's deployment object has no tag flag; the deploying job (deployable.tag) has one. It is now carried as EnvironmentState.tag, defaulting to false. Old reports still render and fall back to the SHA, so schema_version stays 2.

Not verified

  • Whether GitLab resolves an unescaped / in a compare path. The tests only check the URL string.

@lesnik512
lesnik512 merged commit 4dfc740 into main Sep 30, 2026
12 checks passed
@lesnik512
lesnik512 deleted the compare-link branch September 30, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant