diff --git a/src/layouts/BaseLayout/InstallationHelpBanner/InstallationHelpBanner.jsx b/src/layouts/BaseLayout/InstallationHelpBanner/InstallationHelpBanner.jsx index 2450254872..371dc1b5c0 100644 --- a/src/layouts/BaseLayout/InstallationHelpBanner/InstallationHelpBanner.jsx +++ b/src/layouts/BaseLayout/InstallationHelpBanner/InstallationHelpBanner.jsx @@ -36,7 +36,7 @@ function InstallationHelpBanner() { const { provider } = useParams() const { params } = useLocationParams() - if (providerToName(provider) !== 'Github') return null + if (providerToName(provider) !== 'GitHub') return null const { setup_action: setupAction } = params if (setupAction !== 'install') return null diff --git a/src/layouts/Header/components/UserDropdown/UserDropdown.tsx b/src/layouts/Header/components/UserDropdown/UserDropdown.tsx index 7a056b2094..b40e669074 100644 --- a/src/layouts/Header/components/UserDropdown/UserDropdown.tsx +++ b/src/layouts/Header/components/UserDropdown/UserDropdown.tsx @@ -33,7 +33,7 @@ function UserDropdown() { }) const { provider } = useParams() - const isGh = providerToName(provider) === 'Github' + const isGh = providerToName(provider) === 'GitHub' const history = useHistory() const items = diff --git a/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.jsx b/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.jsx index ecd3306f6a..0414dc0bbc 100644 --- a/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.jsx +++ b/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.jsx @@ -11,7 +11,7 @@ function GithubIntegrationCopy({ integrationId }) { return (

This account is configured via the GitHub App. You can manage the apps - repository integration on Github. + repository integration on GitHub.

) return ( diff --git a/src/pages/CodecovAIPage/InstallCodecovAI/InstallCodecovAI.tsx b/src/pages/CodecovAIPage/InstallCodecovAI/InstallCodecovAI.tsx index 9d8bff127f..4e72f85f5c 100644 --- a/src/pages/CodecovAIPage/InstallCodecovAI/InstallCodecovAI.tsx +++ b/src/pages/CodecovAIPage/InstallCodecovAI/InstallCodecovAI.tsx @@ -10,14 +10,14 @@ const COPY_APP_INSTALL_STRING = const InstallCodecovAI: React.FC = () => { const { theme } = useThemeContext() const isDarkMode = theme === Theme.DARK - const githubImage = loginProviderImage('Github', !isDarkMode) + const githubImage = loginProviderImage('GitHub', !isDarkMode) return (
- Install the Codecov AI app on Github + Install the Codecov AI app on GitHub diff --git a/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.jsx b/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.jsx index 5fc971044b..dd041595b5 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.jsx +++ b/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.jsx @@ -9,8 +9,8 @@ import BannerContent from 'ui/Banner/BannerContent' import BannerHeading from 'ui/Banner/BannerHeading' export const ProvidersEnum = Object.freeze({ - Github: 'Github', - Gitlab: 'Gitlab', + Github: 'GitHub', + Gitlab: 'GitLab', BitBucket: 'BitBucket', }) diff --git a/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.test.jsx b/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.test.jsx index 6e7069ead7..32fc2f6cc4 100644 --- a/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.test.jsx +++ b/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.test.jsx @@ -37,7 +37,7 @@ describe('PullLabel', () => { it('renders provider pull url', async () => { render(, { wrapper }) - const pullUrlLink = await screen.findByRole('link', { name: /Github/ }) + const pullUrlLink = await screen.findByRole('link', { name: /GitHub/ }) expect(pullUrlLink).toBeInTheDocument() expect(pullUrlLink).toHaveAttribute( 'href', diff --git a/src/pages/DefaultOrgSelector/DefaultOrgSelector.jsx b/src/pages/DefaultOrgSelector/DefaultOrgSelector.jsx index 7e8b54a119..583d691b7d 100644 --- a/src/pages/DefaultOrgSelector/DefaultOrgSelector.jsx +++ b/src/pages/DefaultOrgSelector/DefaultOrgSelector.jsx @@ -69,7 +69,7 @@ function DefaultOrgSelector() { }) const { provider } = useParams() - const isGh = providerToName(provider) === 'Github' + const isGh = providerToName(provider) === 'GitHub' const history = useHistory() diff --git a/src/pages/DefaultOrgSelector/GitHubHelpBanner/GitHubHelpBanner.tsx b/src/pages/DefaultOrgSelector/GitHubHelpBanner/GitHubHelpBanner.tsx index 0976d91d85..d3c1c52eae 100644 --- a/src/pages/DefaultOrgSelector/GitHubHelpBanner/GitHubHelpBanner.tsx +++ b/src/pages/DefaultOrgSelector/GitHubHelpBanner/GitHubHelpBanner.tsx @@ -44,7 +44,7 @@ function ResyncButton() { function GitHubHelpBanner() { const [showModal, setShowModal] = useState(false) const { provider } = useParams<{ provider: Provider }>() - if (providerToName(provider) !== 'Github') return null + if (providerToName(provider) !== 'GitHub') return null return ( <> diff --git a/src/pages/EnterpriseLandingPage/EnterpriseLandingPage.test.tsx b/src/pages/EnterpriseLandingPage/EnterpriseLandingPage.test.tsx index 80d2626954..56f842dfde 100644 --- a/src/pages/EnterpriseLandingPage/EnterpriseLandingPage.test.tsx +++ b/src/pages/EnterpriseLandingPage/EnterpriseLandingPage.test.tsx @@ -106,7 +106,7 @@ describe('EnterpriseLandingPage', () => { it('displays bitbucket card', async () => { render(, { wrapper }) - const element = await screen.findByRole('heading', { name: 'Bitbucket' }) + const element = await screen.findByRole('heading', { name: 'BitBucket' }) expect(element).toBeInTheDocument() }) @@ -138,7 +138,7 @@ describe('EnterpriseLandingPage', () => { it('displays bitbucket button', () => { render(, { wrapper }) - expect(screen.queryByText('Bitbucket')).toBeNull() + expect(screen.queryByText('BitBucket')).toBeNull() }) }) }) diff --git a/src/pages/EnterpriseLandingPage/ProviderCard/ProviderCard.test.tsx b/src/pages/EnterpriseLandingPage/ProviderCard/ProviderCard.test.tsx index 49fb4e664b..41bd2c3997 100644 --- a/src/pages/EnterpriseLandingPage/ProviderCard/ProviderCard.test.tsx +++ b/src/pages/EnterpriseLandingPage/ProviderCard/ProviderCard.test.tsx @@ -27,7 +27,7 @@ describe('ProviderCard', () => { ) const element = screen.getByRole('link', { - name: 'Login via Bitbucket', + name: 'Login via BitBucket', }) expect(element).toBeInTheDocument() expect(element).toHaveAttribute('href', '/login/bb') @@ -43,7 +43,7 @@ describe('ProviderCard', () => { ) const element = screen.getByRole('link', { - name: 'Login via Bitbucket Server', + name: 'Login via BitBucket Server', }) expect(element).toBeInTheDocument() expect(element).toHaveAttribute('href', '/login/bbs') diff --git a/src/pages/OwnerPage/HeaderBanners/GithubConfigBanner/GithubConfigBanner.jsx b/src/pages/OwnerPage/HeaderBanners/GithubConfigBanner/GithubConfigBanner.jsx index bd85d176eb..60b17e8251 100644 --- a/src/pages/OwnerPage/HeaderBanners/GithubConfigBanner/GithubConfigBanner.jsx +++ b/src/pages/OwnerPage/HeaderBanners/GithubConfigBanner/GithubConfigBanner.jsx @@ -8,7 +8,7 @@ import BannerHeading from 'ui/Banner/BannerHeading' const GithubConfigBanner = () => { const { provider } = useParams() - const isGh = providerToName(provider) === 'Github' + const isGh = providerToName(provider) === 'GitHub' if (!isGh) return null diff --git a/src/pages/RepoPage/CoverageOnboarding/NewRepoTab.tsx b/src/pages/RepoPage/CoverageOnboarding/NewRepoTab.tsx index c53d9e2dc9..998db96605 100644 --- a/src/pages/RepoPage/CoverageOnboarding/NewRepoTab.tsx +++ b/src/pages/RepoPage/CoverageOnboarding/NewRepoTab.tsx @@ -40,7 +40,7 @@ type CIUrls = Record const getInitialProvider = (provider: Provider, path: string, urls: CIUrls) => { const defaultProvider = - providerToName(provider) !== 'Github' + providerToName(provider) !== 'GitHub' ? CI_PROVIDERS.OtherCI : CI_PROVIDERS.GitHubActions if (path === urls.CircleCI) { diff --git a/src/pages/SyncProviderPage/SyncButton.test.tsx b/src/pages/SyncProviderPage/SyncButton.test.tsx index ed34b0dc69..d5d500a150 100644 --- a/src/pages/SyncProviderPage/SyncButton.test.tsx +++ b/src/pages/SyncProviderPage/SyncButton.test.tsx @@ -14,7 +14,7 @@ describe('SyncButton', () => { it('renders sync button', () => { render(, { wrapper }) - const link = screen.getByRole('link', { name: /Sync with Github/ }) + const link = screen.getByRole('link', { name: /Sync with GitHub/ }) const expectedRedirect = encodeURIComponent('http://localhost:3000/gh') expect(link).toBeInTheDocument() @@ -26,7 +26,7 @@ describe('SyncButton', () => { it('renders sync button', () => { render(, { wrapper }) - const link = screen.getByRole('link', { name: /Sync with Gitlab/ }) + const link = screen.getByRole('link', { name: /Sync with GitLab/ }) const expectedRedirect = encodeURIComponent('http://localhost:3000/gl') expect(link).toBeInTheDocument() @@ -51,7 +51,7 @@ describe('SyncButton', () => { render(, { wrapper }) const link = screen.getByRole('link', { - name: /Sync with Github Enterprise/, + name: /Sync with GitHub Enterprise/, }) const expectedRedirect = encodeURIComponent('http://localhost:3000/ghe') @@ -65,7 +65,7 @@ describe('SyncButton', () => { render(, { wrapper }) const link = screen.getByRole('link', { - name: /Sync with Gitlab Enterprise/, + name: /Sync with GitLab Enterprise/, }) const expectedRedirect = encodeURIComponent('http://localhost:3000/gle') diff --git a/src/pages/SyncProviderPage/SyncProviderPage.test.tsx b/src/pages/SyncProviderPage/SyncProviderPage.test.tsx index 3c97787866..17468e8da4 100644 --- a/src/pages/SyncProviderPage/SyncProviderPage.test.tsx +++ b/src/pages/SyncProviderPage/SyncProviderPage.test.tsx @@ -136,19 +136,19 @@ describe('SyncProviderPage', () => { setup() render(, { wrapper }) - const githubSyncButton = await screen.findByText(/Sync with Github/) + const githubSyncButton = await screen.findByText(/Sync with GitHub/) expect(githubSyncButton).toBeInTheDocument() }) - it('renders github enterprise sync button', async () => { + it('renders gitlab enterprise sync button', async () => { setup() render(, { wrapper }) - const gheSyncButton = await screen.findByText( - /Sync with Gitlab Enterprise/ + const gleSyncButton = await screen.findByText( + /Sync with GitLab Enterprise/ ) - expect(gheSyncButton).toBeInTheDocument() + expect(gleSyncButton).toBeInTheDocument() }) }) diff --git a/src/shared/GlobalBanners/GitHubRateLimitExceeded/GitHubRateLimitExceededBanner.tsx b/src/shared/GlobalBanners/GitHubRateLimitExceeded/GitHubRateLimitExceededBanner.tsx index 500a87c573..86b9ae9c8f 100644 --- a/src/shared/GlobalBanners/GitHubRateLimitExceeded/GitHubRateLimitExceededBanner.tsx +++ b/src/shared/GlobalBanners/GitHubRateLimitExceeded/GitHubRateLimitExceededBanner.tsx @@ -11,7 +11,7 @@ interface URLParams { const GitHubRateLimitExceededBanner = () => { const { provider } = useParams() - const isGh = providerToName(provider) === 'Github' + const isGh = providerToName(provider) === 'GitHub' if (!isGh) return null diff --git a/src/shared/GlobalTopBanners/RequestInstallBanner/RequestInstallBanner.tsx b/src/shared/GlobalTopBanners/RequestInstallBanner/RequestInstallBanner.tsx index 379c7c9a87..6ff391dd08 100644 --- a/src/shared/GlobalTopBanners/RequestInstallBanner/RequestInstallBanner.tsx +++ b/src/shared/GlobalTopBanners/RequestInstallBanner/RequestInstallBanner.tsx @@ -32,7 +32,7 @@ const RequestInstallBanner = () => { // @ts-expect-errors useLocationParams needs to be updated to support generic types const setupAction = params?.setup_action - const isGitHubProvider = provider && providerToName(provider) === 'Github' + const isGitHubProvider = provider && providerToName(provider) === 'GitHub' const closeModalAndSaveToLocalStorage = () => { saveToLocalStorage(APP_INSTALL_BANNER_KEY) diff --git a/src/shared/utils/loginProviders.test.ts b/src/shared/utils/loginProviders.test.ts index e6c2a5784b..88801f726b 100644 --- a/src/shared/utils/loginProviders.test.ts +++ b/src/shared/utils/loginProviders.test.ts @@ -49,7 +49,7 @@ describe('loginProviderToName', () => { describe('valid value is passed', () => { it('returns the provider name', () => { const data = loginProviderToName(LOGIN_PROVIDER_SHORT_NAMES.gh) - expect(data).toMatch(/Github/) + expect(data).toMatch(/GitHub/) }) }) diff --git a/src/shared/utils/loginProviders.ts b/src/shared/utils/loginProviders.ts index adf683c569..31519fcc95 100644 --- a/src/shared/utils/loginProviders.ts +++ b/src/shared/utils/loginProviders.ts @@ -11,12 +11,12 @@ import sentryLogo from 'assets/providers/sentry-icon.svg' export const LoginProvidersEnum = { BITBUCKET: { provider: 'bb', - name: 'Bitbucket', + name: 'BitBucket', external: 'BITBUCKET', externalKey: 'bb', selfHosted: 'BITBUCKET_SERVER', selfHostedKey: 'bbs', - selfHostedName: 'Bitbucket Server', + selfHostedName: 'BitBucket Server', variant: 'bitbucket', }, GITHUB: { @@ -70,17 +70,17 @@ export function loginProviderToShortName(loginProvider?: string) { } export const LOGIN_PROVIDER_NAMES = { - gh: 'Github', + gh: 'GitHub', bb: 'BitBucket', - gl: 'Gitlab', - ghe: 'Github Enterprise', - gle: 'Gitlab Enterprise', + gl: 'GitLab', + ghe: 'GitHub Enterprise', + gle: 'GitLab Enterprise', bbs: 'BitBucket Server', - github: 'Github', + github: 'GitHub', bitbucket: 'BitBucket', - gitlab: 'Gitlab', - github_enterprise: 'Github Enterprise', - gitlab_enterprise: 'Gitlab Enterprise', + gitlab: 'GitLab', + github_enterprise: 'GitHub Enterprise', + gitlab_enterprise: 'GitLab Enterprise', bitbucket_server: 'BitBucket Server', sentry: 'Sentry', okta: 'Okta', @@ -97,22 +97,22 @@ export function loginProviderToName(loginProvider?: string) { } export const LOGIN_PROVIDER_IMAGES = { - Github: githubLogo, - Gitlab: gitlabLogo, + GitHub: githubLogo, + GitLab: gitlabLogo, BitBucket: bitbucketLogo, - 'Github Enterprise': githubLogo, - 'Gitlab Enterprise': gitlabLogo, + 'GitHub Enterprise': githubLogo, + 'GitLab Enterprise': gitlabLogo, 'BitBucket Server': bitbucketLogo, Sentry: sentryLogo, Okta: oktaLogo, } as const export const LOGIN_PROVIDER_DARK_MODE_IMAGES = { - Github: githubLogoWhite, - Gitlab: gitlabLogo, + GitHub: githubLogoWhite, + GitLab: gitlabLogo, BitBucket: bitbucketLogo, - 'Github Enterprise': githubLogoWhite, - 'Gitlab Enterprise': gitlabLogo, + 'GitHub Enterprise': githubLogoWhite, + 'GitLab Enterprise': gitlabLogo, 'BitBucket Server': bitbucketLogo, Sentry: sentryLogoWhite, Okta: oktaLogo, diff --git a/src/shared/utils/provider.test.ts b/src/shared/utils/provider.test.ts index 9684f7436b..93bad64b22 100644 --- a/src/shared/utils/provider.test.ts +++ b/src/shared/utils/provider.test.ts @@ -12,13 +12,13 @@ vi.mock('config') describe('providerToName', () => { describe('when called with gh', () => { it('returns Github', () => { - expect(providerToName('gh')).toBe('Github') + expect(providerToName('gh')).toBe('GitHub') }) }) describe('when called with gl', () => { it('returns Gitlab', () => { - expect(providerToName('gl')).toBe('Gitlab') + expect(providerToName('gl')).toBe('GitLab') }) }) @@ -30,13 +30,13 @@ describe('providerToName', () => { describe('when called with ghe', () => { it('returns Github Enterprise', () => { - expect(providerToName('ghe')).toBe('Github Enterprise') + expect(providerToName('ghe')).toBe('GitHub Enterprise') }) }) describe('when called with gle', () => { it('returns Gitlab Enterprise', () => { - expect(providerToName('gle')).toBe('Gitlab Enterprise') + expect(providerToName('gle')).toBe('GitLab Enterprise') }) }) @@ -48,13 +48,13 @@ describe('providerToName', () => { describe('when called with Github', () => { it('returns Github', () => { - expect(providerToName('github')).toBe('Github') + expect(providerToName('github')).toBe('GitHub') }) }) describe('when called with Gitlab', () => { it('returns Gitlab', () => { - expect(providerToName('gitlab')).toBe('Gitlab') + expect(providerToName('gitlab')).toBe('GitLab') }) }) @@ -66,13 +66,13 @@ describe('providerToName', () => { describe('when called with github_enterprise', () => { it('returns Github Enterprise', () => { - expect(providerToName('github_enterprise')).toBe('Github Enterprise') + expect(providerToName('github_enterprise')).toBe('GitHub Enterprise') }) }) describe('when called with gitlab-enterprise', () => { it('returns Gitlab Enterprise', () => { - expect(providerToName('gitlab_enterprise')).toBe('Gitlab Enterprise') + expect(providerToName('gitlab_enterprise')).toBe('GitLab Enterprise') }) }) diff --git a/src/shared/utils/provider.ts b/src/shared/utils/provider.ts index 452bfaac69..609e00612b 100644 --- a/src/shared/utils/provider.ts +++ b/src/shared/utils/provider.ts @@ -5,17 +5,17 @@ import { Provider } from 'shared/api/helpers' export function providerToName(provider: Provider) { return { - gh: 'Github', + gh: 'GitHub', bb: 'BitBucket', - gl: 'Gitlab', - ghe: 'Github Enterprise', - gle: 'Gitlab Enterprise', + gl: 'GitLab', + ghe: 'GitHub Enterprise', + gle: 'GitLab Enterprise', bbs: 'BitBucket Server', - github: 'Github', + github: 'GitHub', bitbucket: 'BitBucket', - gitlab: 'Gitlab', - github_enterprise: 'Github Enterprise', - gitlab_enterprise: 'Gitlab Enterprise', + gitlab: 'GitLab', + github_enterprise: 'GitHub Enterprise', + gitlab_enterprise: 'GitLab Enterprise', bitbucket_server: 'BitBucket Server', }[provider.toLowerCase()] } @@ -49,11 +49,11 @@ export function getProviderCommitURL({ commit: string }) { return { - Github: `https://github.com/${owner}/${repo}/commit/${commit}`, + GitHub: `https://github.com/${owner}/${repo}/commit/${commit}`, BitBucket: `https://bitbucket.org/${owner}/${repo}/commits/${commit}`, - Gitlab: `https://gitlab.com/${owner}/${repo}/-/commit/${commit}`, - 'Github Enterprise': `${config.GHE_URL}/${owner}/${repo}/commit/${commit}`, - 'Gitlab Enterprise': `${config.GLE_URL}/${owner}/${repo}/-/commit/${commit}`, + GitLab: `https://gitlab.com/${owner}/${repo}/-/commit/${commit}`, + 'GitHub Enterprise': `${config.GHE_URL}/${owner}/${repo}/commit/${commit}`, + 'GitLab Enterprise': `${config.GLE_URL}/${owner}/${repo}/-/commit/${commit}`, 'BitBucket Server': `${config.BBS_URL}/${owner}/${repo}/commits/${commit}`, // @ts-expect-error - provider could be undefined but it should be fine }[providerToName(provider)] @@ -71,11 +71,11 @@ export function getProviderPullURL({ pullId: number }) { return { - Github: `https://github.com/${owner}/${repo}/pull/${pullId}`, + GitHub: `https://github.com/${owner}/${repo}/pull/${pullId}`, BitBucket: `https://bitbucket.org/${owner}/${repo}/pull-requests/${pullId}`, - Gitlab: `https://gitlab.com/${owner}/${repo}/-/merge_requests/${pullId}`, - 'Github Enterprise': `${config.GHE_URL}/${owner}/${repo}/pull/${pullId}`, - 'Gitlab Enterprise': `${config.GLE_URL}/${owner}/${repo}/-/merge_requests/${pullId}`, + GitLab: `https://gitlab.com/${owner}/${repo}/-/merge_requests/${pullId}`, + 'GitHub Enterprise': `${config.GHE_URL}/${owner}/${repo}/pull/${pullId}`, + 'GitLab Enterprise': `${config.GLE_URL}/${owner}/${repo}/-/merge_requests/${pullId}`, 'BitBucket Server': `${config.BBS_URL}/${owner}/${repo}/pull-requests/${pullId}`, // @ts-expect-error - provider could be undefined but it should be fine }[providerToName(provider)] diff --git a/src/ui/ContextSwitcher/ContextSwitcher.tsx b/src/ui/ContextSwitcher/ContextSwitcher.tsx index d022970e9b..e506be53fb 100644 --- a/src/ui/ContextSwitcher/ContextSwitcher.tsx +++ b/src/ui/ContextSwitcher/ContextSwitcher.tsx @@ -170,7 +170,7 @@ function ContextSwitcher({ const intersectionRef = useLoadMore({ onLoadMore }) const defaultOrgUsername = currentUser?.defaultOrgUsername - const isGh = providerToName(provider) === 'Github' + const isGh = providerToName(provider) === 'GitHub' const isSelfHosted = config.IS_SELF_HOSTED const isCustomGitHubApp = config.GH_APP !== DEFAULT_GH_APP