Skip to content

feat(ui): add Azure DevOps support to getGitCommitURL#6327

Draft
jz-wilson wants to merge 1 commit into
akuity:mainfrom
jz-wilson:feat/ui-azure-devops-commit-urls
Draft

feat(ui): add Azure DevOps support to getGitCommitURL#6327
jz-wilson wants to merge 1 commit into
akuity:mainfrom
jz-wilson:feat/ui-azure-devops-commit-urls

Conversation

@jz-wilson

Copy link
Copy Markdown

Summary

The getGitCommitURL utility in open-container-initiative-utils.ts builds deeplink URLs from org.opencontainers.image.source + org.opencontainers.image.revision annotations. It currently handles GitHub, GitLab, and Bitbucket but falls through to returning the raw source URL for Azure DevOps, meaning the commit hash on a Freight card never becomes a clickable /commit/<sha> link.

Changes

  • open-container-initiative-utils.ts: adds an else if (resource.includes('dev.azure.com')) branch that returns \${url}/commit/${revision}`directly against the original source URL (rather than the reconstructedbaseUrl) because ADO's four-segment path form — https://dev.azure.com/{org}/{project}/_git/{repo}` — doesn't compose cleanly from gitUrlParse's owner + name fields.

  • open-container-initiative-utils.test.ts: adds one test case mirroring the existing GitHub/GitLab/Bitbucket patterns.

Test

pnpm vitest run src/features/freight-timeline/open-container-initiative-utils.test.ts
# 13 passed (13)

ADO URL anatomy

https://dev.azure.com/{org}/{project}/_git/{repo}
                                           ↑ commit deeplink appended here
→ https://dev.azure.com/{org}/{project}/_git/{repo}/commit/{sha}

@jz-wilson jz-wilson requested a review from a team as a code owner May 21, 2026 14:36
@netlify

netlify Bot commented May 21, 2026

Copy link
Copy Markdown

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit fd2d399
🔍 Latest deploy log https://app.netlify.com/projects/docs-kargo-io/deploys/6a0f1cc3332c36000898ed20
😎 Deploy Preview https://deploy-preview-6327.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kargo-governance-bot kargo-governance-bot Bot added needs/area Issue or PR needs to be labeled to indicate what parts of the code base are affected needs/kind Issue or PR needs to be labeled to clarify its nature needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed policy/no-linked-issue labels May 21, 2026
@kargo-governance-bot

Copy link
Copy Markdown

Automated Policy Notice

This pull request has been converted to a draft because it does not reference an unblocked issue. Maintainers do not routinely review drafts.

All contributions to Kargo require a linked, unblocked issue. This ensures that proposed changes have been reviewed by maintainers before effort is invested.

To move forward:

  1. Open a Bug Report or Feature Request
  2. Wait for a maintainer to review the issue and remove any blocking labels
  3. Update this PR's description, linking to the issue using Closes #<number>
  4. Ensure the implementation in this PR is consistent with discussion points in the linked issue
  5. Mark the PR ready for review

See the Contributor Guide for full details.

@kargo-governance-bot kargo-governance-bot Bot marked this pull request as draft May 21, 2026 14:36
Azure DevOps repository URLs have the form:
  https://dev.azure.com/{org}/{project}/_git/{repo}

The existing `getGitCommitURL` switch handled github.com, gitlab.com,
and bitbucket.org but fell through to returning the raw source URL for
ADO, meaning the commit-hash link was never a clickable `/commit/<sha>`
deeplink.

The `gitUrlParse` `baseUrl` approach doesn't compose correctly for ADO's
four-segment path (`/org/project/_git/repo`), so we append
`/commit/${revision}` directly to the original `url` instead.

Adds a test case mirroring the existing GitHub/GitLab/Bitbucket patterns.

Signed-off-by: Johnzell Wilson <johnzellwilson@shiftkey.com>
@jz-wilson jz-wilson force-pushed the feat/ui-azure-devops-commit-urls branch from 9d37265 to fd2d399 Compare May 21, 2026 14:54
@jz-wilson jz-wilson marked this pull request as ready for review May 21, 2026 15:31
@kargo-governance-bot

Copy link
Copy Markdown

Automated Policy Notice

This pull request has been converted to a draft because it does not reference an unblocked issue. Maintainers do not routinely review drafts.

All contributions to Kargo require a linked, unblocked issue. This ensures that proposed changes have been reviewed by maintainers before effort is invested.

To move forward:

  1. Open a Bug Report or Feature Request
  2. Wait for a maintainer to review the issue and remove any blocking labels
  3. Update this PR's description, linking to the issue using Closes #<number>
  4. Ensure the implementation in this PR is consistent with discussion points in the linked issue
  5. Mark the PR ready for review

See the Contributor Guide for full details.

@kargo-governance-bot kargo-governance-bot Bot marked this pull request as draft May 21, 2026 15:31
@jz-wilson jz-wilson marked this pull request as ready for review May 21, 2026 15:31
@kargo-governance-bot

Copy link
Copy Markdown

Automated Policy Notice

This pull request has been converted to a draft because it does not reference an unblocked issue. Maintainers do not routinely review drafts.

All contributions to Kargo require a linked, unblocked issue. This ensures that proposed changes have been reviewed by maintainers before effort is invested.

To move forward:

  1. Open a Bug Report or Feature Request
  2. Wait for a maintainer to review the issue and remove any blocking labels
  3. Update this PR's description, linking to the issue using Closes #<number>
  4. Ensure the implementation in this PR is consistent with discussion points in the linked issue
  5. Mark the PR ready for review

See the Contributor Guide for full details.

@kargo-governance-bot kargo-governance-bot Bot marked this pull request as draft May 21, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs/area Issue or PR needs to be labeled to indicate what parts of the code base are affected needs/kind Issue or PR needs to be labeled to clarify its nature needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed policy/no-linked-issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant