MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / getCodeHostIcon

Function getCodeHostIcon

packages/web/src/lib/utils.ts:309–344  ·  view source on GitHub ↗
(codeHostType: CodeHostType | ConnectionType)

Source from the content-addressed store, hash-verified

307}
308
309export const getCodeHostIcon = (codeHostType: CodeHostType | ConnectionType): { src: string, className?: string } => {
310 switch (codeHostType) {
311 case "github":
312 return {
313 src: githubLogo,
314 className: "dark:invert",
315 };
316 case "gitlab":
317 return {
318 src: gitlabLogo,
319 };
320 case "gitea":
321 return {
322 src: giteaLogo,
323 }
324 case "gerrit":
325 return {
326 src: gerritLogo,
327 }
328 case "bitbucket":
329 case "bitbucketCloud":
330 case "bitbucketServer":
331 return {
332 src: bitbucketLogo,
333 }
334 case "azuredevops":
335 return {
336 src: azuredevopsLogo,
337 }
338 case "git":
339 case "genericGitHost":
340 return {
341 src: gitLogo,
342 }
343 }
344}
345
346export const getCodeHostCommitUrl = ({
347 webUrl,

Callers 8

SearchScopeIconFunction · 0.90
RepoVisitHistoryFunction · 0.90
getSearchScopeIconFunction · 0.90
getColumnsFunction · 0.90
RepoBadgeFunction · 0.90
RepoHeaderFunction · 0.90
getCodeHostInfoForRepoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected