Skip to content

fix: add missing '/-/' path segment to UI URL generation functions#3668

Open
ManvithaP-hub wants to merge 1 commit intoharness:mainfrom
ManvithaP-hub:fix/ui-url-missing-dash-segment-3661
Open

fix: add missing '/-/' path segment to UI URL generation functions#3668
ManvithaP-hub wants to merge 1 commit intoharness:mainfrom
ManvithaP-hub:fix/ui-url-missing-dash-segment-3661

Conversation

@ManvithaP-hub
Copy link
Copy Markdown

What this PR does

Fixes incorrect UI URLs generated by the backend in app/url/provider.go.

Problem

Four URL generation functions were missing the /-/ path segment that
the frontend routing expects, causing broken links in:

  • DRONE_BUILD_LINK environment variable in pipeline executions
  • Webhook payloads for PR, commit, and pipeline links
Function Before After
GenerateUIBuildURL /{repoPath}/pipelines/... /{repoPath}/-/pipelines/...
GenerateUIPRURL /{repoPath}/pulls/... /{repoPath}/-/pulls/...
GenerateUICompareURL /{repoPath}/pulls/compare/... /{repoPath}/-/pulls/compare/...
GenerateUIRefURL /{repoPath}/commit/... /{repoPath}/-/commit/...

Fix

Added "-" as a path segment to all four GenerateUI*URL functions
in app/url/provider.go and updated the corresponding test expectations
in app/url/provider_test.go.

Fixes #3661

Fixes harness#3661

The GenerateUIBuildURL, GenerateUIPRURL, GenerateUICompareURL, and
GenerateUIRefURL functions were missing the '/-/' path segment that
the frontend routing expects, causing incorrect URLs in DRONE_BUILD_LINK
environment variables and webhook payloads.

Signed-off-by: manvitha92 <[email protected]>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ManvithaP-hub
Copy link
Copy Markdown
Author

"Hi @harness-maintainers, could someone please review this when you get a chance? This fix: add missing '/-/' path segment to UI URL generation functions#3668. Happy to make any adjustments!

SchoIsles pushed a commit to SchoIsles/gitness that referenced this pull request Mar 11, 2026
@ManvithaP-hub
Copy link
Copy Markdown
Author

"Hi @harness-maintainers, could someone please review this when you get a chance? This fix: add missing '/-/' path segment to UI URL generation functions#3668. Happy to make any adjustments!

@ManvithaP-hub
Copy link
Copy Markdown
Author

Hi @harness-maintainers, could someone please review this when you get a chance? This fix: add missing '/-/' path segment to UI URL generation functions#3668. Happy to make any adjustments!

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.

Fix: UI URL generation missing '/-/' path segment

2 participants