Skip to content

Conversation

@julianderks
Copy link
Contributor

@julianderks julianderks commented Feb 10, 2026

Summary

The getCommitUrl() function in the ArgoCD extension UI was hardcoded to use /commit/{sha} for all SCM providers. This works for GitHub, Gitea, Forgejo, and Azure DevOps, but produces broken links for:

  • Bitbucket Cloud — expects /commits/{sha} (plural)
  • GitLab — expects /-/commit/{sha}

Fix

Added a domain-based lookup table inside getCommitUrl() that maps SCM domains to their correct commit URL path pattern, with /commit/ as the default fallback. Adding support for a new SCM is a single line addition.

Images

Hyperlink

before_1

Wrong URL for Bitbucket Cloud

before_2

@codecov-commenter
Copy link

Bundle Report

Changes will increase total bundle size by 150 bytes (0.36%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
argocd-ui-extension-array-push 42.08kB 150 bytes (0.36%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: argocd-ui-extension-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
extension-promoter.js 150 bytes 42.08kB 0.36%

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.63%. Comparing base (ed43256) to head (2d7638e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1037      +/-   ##
==========================================
- Coverage   50.92%   50.63%   -0.30%     
==========================================
  Files          51       51              
  Lines        5492     5492              
==========================================
- Hits         2797     2781      -16     
- Misses       2399     2411      +12     
- Partials      296      300       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zachaller what are your thoughts on building this on the frontend vs. the backend? Frontend means we don't have direct access to the ScmProvider/GitRepository resource to toggle the provider (i.e. we have to do direct URL inspection on the frontend). But doing it on the backend means more code and more stuff stored in the CRs.

A hybrid would be to just store the ScmProvider kind in the CR and then have frontend code to construct URLs based on that.

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.

3 participants