mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-13 12:55:19 +00:00
add support for ado logo
This commit is contained in:
parent
84eda76bd9
commit
521b316d38
3 changed files with 22 additions and 0 deletions
1
packages/web/public/azuredevops.svg
Normal file
1
packages/web/public/azuredevops.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg id="f4337506-5d95-4e80-b7ca-68498c6e008e" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><defs><linearGradient id="ba420277-700e-42cc-9de9-5388a5c16e54" x1="9" y1="16.97" x2="9" y2="1.03" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0078d4" /><stop offset="0.16" stop-color="#1380da" /><stop offset="0.53" stop-color="#3c91e5" /><stop offset="0.82" stop-color="#559cec" /><stop offset="1" stop-color="#5ea0ef" /></linearGradient></defs><title>Icon-devops-261</title><path id="a91f0ca4-8fb7-4019-9c09-0a52e2c05754" d="M17,4v9.74l-4,3.28-6.2-2.26V17L3.29,12.41l10.23.8V4.44Zm-3.41.49L7.85,1V3.29L2.58,4.84,1,6.87v4.61l2.26,1V6.57Z" fill="url(#ba420277-700e-42cc-9de9-5388a5c16e54)" /></svg>
|
||||
|
After Width: | Height: | Size: 740 B |
|
|
@ -14,6 +14,7 @@ import { gerritSchema } from "@sourcebot/schemas/v3/gerrit.schema";
|
|||
import { giteaSchema } from "@sourcebot/schemas/v3/gitea.schema";
|
||||
import { githubSchema } from "@sourcebot/schemas/v3/github.schema";
|
||||
import { gitlabSchema } from "@sourcebot/schemas/v3/gitlab.schema";
|
||||
import { azuredevopsSchema } from "@sourcebot/schemas/v3/azuredevops.schema";
|
||||
import { GithubConnectionConfig } from "@sourcebot/schemas/v3/github.type";
|
||||
import { GitlabConnectionConfig } from "@sourcebot/schemas/v3/gitlab.type";
|
||||
import { GiteaConnectionConfig } from "@sourcebot/schemas/v3/gitea.type";
|
||||
|
|
@ -2187,6 +2188,8 @@ const parseConnectionConfig = (config: string) => {
|
|||
return gerritSchema;
|
||||
case 'bitbucket':
|
||||
return bitbucketSchema;
|
||||
case 'azuredevops':
|
||||
return azuredevopsSchema;
|
||||
case 'git':
|
||||
return genericGitHostSchema;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { type ClassValue, clsx } from "clsx"
|
||||
import { twMerge } from "tailwind-merge"
|
||||
import githubLogo from "@/public/github.svg";
|
||||
import azuredevopsLogo from "@/public/azuredevops.svg";
|
||||
import gitlabLogo from "@/public/gitlab.svg";
|
||||
import giteaLogo from "@/public/gitea.svg";
|
||||
import gerritLogo from "@/public/gerrit.svg";
|
||||
|
|
@ -69,6 +70,7 @@ export type CodeHostType =
|
|||
"gerrit" |
|
||||
"bitbucket-cloud" |
|
||||
"bitbucket-server" |
|
||||
"azuredevops" |
|
||||
"generic-git-host";
|
||||
|
||||
export type AuthProviderType =
|
||||
|
|
@ -210,6 +212,17 @@ export const getCodeHostInfoForRepo = (repo: {
|
|||
iconClassName: className,
|
||||
}
|
||||
}
|
||||
case 'azuredevops': {
|
||||
const { src, className } = getCodeHostIcon('azuredevops')!;
|
||||
return {
|
||||
type: "azuredevops",
|
||||
displayName: displayName ?? name,
|
||||
codeHostName: "Azure DevOps",
|
||||
repoLink: webUrl,
|
||||
icon: src,
|
||||
iconClassName: className,
|
||||
}
|
||||
}
|
||||
case 'gitea': {
|
||||
const { src, className } = getCodeHostIcon('gitea')!;
|
||||
return {
|
||||
|
|
@ -293,6 +306,10 @@ export const getCodeHostIcon = (codeHostType: string): { src: string, className?
|
|||
return {
|
||||
src: bitbucketLogo,
|
||||
}
|
||||
case "azuredevops":
|
||||
return {
|
||||
src: azuredevopsLogo,
|
||||
}
|
||||
case "generic-git-host":
|
||||
return {
|
||||
src: gitLogo,
|
||||
|
|
@ -309,6 +326,7 @@ export const isAuthSupportedForCodeHost = (codeHostType: CodeHostType): boolean
|
|||
case "gitea":
|
||||
case "bitbucket-cloud":
|
||||
case "bitbucket-server":
|
||||
case "azuredevops":
|
||||
return true;
|
||||
case "generic-git-host":
|
||||
case "gerrit":
|
||||
|
|
|
|||
Loading…
Reference in a new issue