Skip to content

fix(x2a): Fixing links in the artifacts path#2332

Merged
elai-shalev merged 4 commits intoredhat-developer:mainfrom
eloycoto:LinksFix
Feb 16, 2026
Merged

fix(x2a): Fixing links in the artifacts path#2332
elai-shalev merged 4 commits intoredhat-developer:mainfrom
eloycoto:LinksFix

Conversation

@eloycoto
Copy link
Contributor

Fixing the link on the Artifacts, because the link was not correct:

Now it's correct path, as:

https://github.com/eloycoto/chef-examples/blob/eloy-test/06720ae0-817f-44ae-9bf7-5d65dda5a0b4.myprj/migration-plan.md```

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Feb 15, 2026

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-x2a

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-x2a workspaces/x2a/plugins/x2a none v1.0.0

return `${targetRepoUrl}/blob/main/${value}`;
// Remove .git suffix if present (repos normalized for cloning have .git)
const baseUrl = targetRepoUrl.endsWith('.git')
? targetRepoUrl.slice(0, -4)
Copy link
Contributor

Choose a reason for hiding this comment

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

what about cases when the url provided is "https://github.com/org/repo.git/"
with a trailing slash it would be -5

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK, the endsWidth action only be executed if ends in .git

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean, maybe we need to add

 const baseUrl = targetRepoUrl.endsWith('.git/')
    ? targetRepoUrl.slice(0, -5)

as we don't control the targetRepoUrl

we should have stricter url encoding

@sonarqubecloud
Copy link

@elai-shalev elai-shalev merged commit 90b44e9 into redhat-developer:main Feb 16, 2026
9 checks passed
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.

2 participants