Skip to content

Commit

Permalink
fix: fix issues related to incorrect link for repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mainawycliffe committed Jan 2, 2025
1 parent c878032 commit 6722f83
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/utils/composeHoverMarkdownContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const contentMarkdownTemplate = `
#### Links
[NPM](https://npmjs.com/package/<%= packageName %>) | [<%= repositoryName %>](<%= gitRepositoryURL %>) | <% if (docsHomePageURL) { %> [Homepage](<%= docsHomePageURL %>) <% } %>
[NPM](https://npmjs.com/package/<%= packageName %>) <% if (repositoryName) { %> | [<%= repositoryName %>](<%= gitRepositoryURL %>) <% } %> <% if (docsHomePageURL) { %> | [Homepage](<%= docsHomePageURL %>) <% } %>
<% if (reportBugURL) { %>
[View issues/Report bug](<%= reportBugURL %>)
Expand All @@ -35,7 +35,11 @@ _**⭐️ Latest version**: <%= latestPackageVersion %>_
**License**: <%= packageDetails.license %>
`;

function determineRepositoryNameFromGitURL(gitURL: string): string {
function determineRepositoryNameFromGitURL(gitURL: string): string | undefined {
if (!gitURL) {
return undefined;
}

if (gitURL.toLowerCase().includes("gitlab")) {
return "GitLab";
}
Expand Down

0 comments on commit 6722f83

Please sign in to comment.