Skip to content

Commit

Permalink
Merge branch 'main' into spalmurray/repo-onboarding-radio-button
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmurray-codecov committed May 8, 2024
2 parents 585ff68 + 3bc8feb commit cfb9ecb
Show file tree
Hide file tree
Showing 32 changed files with 886 additions and 440 deletions.
242 changes: 113 additions & 129 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "^1.0.6",
"@radix-ui/react-radio-group": "^1.1.3",
"@sentry/react": "^8.0.0-beta.4",
"@sentry/react": "8.0.0-rc.1",
"@stripe/react-stripe-js": "^1.7.2",
"@stripe/stripe-js": "^1.52.1",
"@tanstack/react-query": "^4.29.5",
Expand Down
5 changes: 4 additions & 1 deletion src/layouts/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ function Footer() {
))}
</ul>
<A to={{ pageName: 'owner' }}>
<CodecovIcon className="mr-2 cursor-pointer text-ds-gray-quinary" />
<CodecovIcon
className="mr-2 cursor-pointer text-ds-gray-quinary"
fillColor="#68737e"
/>
</A>
<ul className="flex flex-1 items-center justify-center gap-4 lg:justify-end">
{rightMenu.map((props, i) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ const mockErroredUploads = {
const mockRepoSettingsTeamData = (isPrivate = false) => ({
owner: {
repository: {
__typename: 'Repository',
defaultBranch: 'master',
private: isPrivate,
uploadToken: 'token',
Expand All @@ -174,6 +175,7 @@ const mockRepoSettingsTeamData = (isPrivate = false) => ({
bot: {
username: 'test',
},
activated: true,
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import CommitCoverageTabs from './CommitCoverageTabs'
const mockRepoSettings = (isPrivate) => ({
owner: {
repository: {
__typename: 'Repository',
defaultBranch: 'main',
private: isPrivate,
uploadToken: 'token',
Expand All @@ -21,6 +22,7 @@ const mockRepoSettings = (isPrivate) => ({
bot: {
username: 'test',
},
activated: true,
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const mockProTier = {
const mockRepoSettings = (isPrivate: boolean) => ({
owner: {
repository: {
__typename: 'Repository',
defaultBranch: 'master',
private: isPrivate,
uploadToken: 'token',
Expand All @@ -42,6 +43,7 @@ const mockRepoSettings = (isPrivate: boolean) => ({
bot: {
username: 'test',
},
activated: true,
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function FilesChanged() {

if (
tierData === TierNames.TEAM &&
!!repoSettings?.repository.private &&
!!repoSettings?.repository?.private &&
multipleTiers
) {
return (
Expand Down
2 changes: 2 additions & 0 deletions src/pages/CommitDetailPage/Header/Header.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const mockedUseFlags = useFlags as jest.Mock<{ multipleTiers: boolean }>
const mockRepoSettings = (isPrivate = false) => ({
owner: {
repository: {
__typename: 'Repository',
defaultBranch: 'master',
private: isPrivate,
uploadToken: 'token',
Expand All @@ -26,6 +27,7 @@ const mockRepoSettings = (isPrivate = false) => ({
bot: {
username: 'test',
},
activated: true,
},
},
})
Expand Down
2 changes: 2 additions & 0 deletions src/pages/PullRequestPage/Header/Header.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const mockedUseFlags = useFlags as jest.Mock<{ multipleTiers: boolean }>
const mockRepoSettings = (isPrivate = false) => ({
owner: {
repository: {
__typename: 'Repository',
defaultBranch: 'master',
private: isPrivate,
uploadToken: 'token',
Expand All @@ -26,6 +27,7 @@ const mockRepoSettings = (isPrivate = false) => ({
bot: {
username: 'test',
},
activated: true,
},
},
})
Expand Down
15 changes: 14 additions & 1 deletion src/pages/PullRequestPage/PullCoverage/Summary/Summary.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,20 @@ describe('Summary', () => {
res(
ctx.status(200),
ctx.data({
owner: { repository: { private: privateRepo } },
owner: {
repository: {
__typename: 'Repository',
defaultBranch: 'master',
private: privateRepo,
uploadToken: 'token',
graphToken: 'token',
yaml: 'yaml',
bot: {
username: 'test',
},
activated: true,
},
},
})
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,18 @@ const mockCommitTeamResponse = {
const mockRepoSettings = (isPrivate = false) => ({
owner: {
repository: {
__typename: 'Repository',
defaultBranch: 'master',
private: isPrivate,
uploadToken: 'token',
profilingToken: 'token',
staticAnalysisToken: 'static analysis token',
graphToken: 'token',
yaml: 'yaml',
bot: {
username: 'test',
},
activated: true,
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ const mockTreeData = {
const mockRepoSettings = {
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'main',
private: false,
uploadToken: 'token',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,20 @@ describe('FilesChangedTab', () => {
res(
ctx.status(200),
ctx.data({
owner: { repository: { private: privateRepo } },
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'master',
private: privateRepo,
uploadToken: 'upload token',
graphToken: 'graph token',
yaml: 'yaml',
bot: {
username: 'test',
},
},
},
})
)
),
Expand Down
2 changes: 2 additions & 0 deletions src/pages/RepoPage/CommitsTab/CommitsTab.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ const mockBranch = (branchName) => ({
const mockRepoSettings = (isPrivate = false) => ({
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'master',
private: isPrivate,
uploadToken: 'token',
Expand Down
2 changes: 2 additions & 0 deletions src/pages/RepoPage/ComponentsTab/ComponentsTab.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jest.mock('./Header', () => ({ children }: { children: React.ReactNode }) => (
const mockRepoSettings = (isPrivate = false) => ({
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'master',
private: isPrivate,
uploadToken: 'token',
Expand Down
2 changes: 2 additions & 0 deletions src/pages/RepoPage/CoverageTab/CoverageTab.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const server = setupServer()
const mockRepoSettings = (isPrivate = false) => ({
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'master',
private: isPrivate,
uploadToken: 'token',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jest.mock('react-use/lib/useIntersection')
const mockRepoSettings = (isPrivate) => ({
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'main',
private: isPrivate,
uploadToken: 'token',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jest.mock('ui/CodeRenderer/hooks/useScrollToLine')
const mockRepoSettings = (isPrivate) => ({
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'main',
private: isPrivate,
uploadToken: 'token',
Expand Down
2 changes: 2 additions & 0 deletions src/pages/RepoPage/FlagsTab/FlagsTab.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const flagsData = [
const mockRepoSettings = (isPrivate = false) => ({
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'master',
private: isPrivate,
uploadToken: 'token',
Expand Down
2 changes: 2 additions & 0 deletions src/pages/RepoPage/PullsTab/PullsTab.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jest.mock('./PullsTableTeam', () => () => 'PullsTableTeam')
const mockRepoSettings = (isPrivate = false) => ({
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'master',
private: isPrivate,
uploadToken: 'token',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,18 @@ describe('BadgesAndGraphsTab', () => {
ctx.data({
owner: {
repository: {
graphToken: graphToken,
__typename: 'Repository',
activated: true,
defaultBranch: 'master',
private: true,
uploadToken: 'token',
graphToken,
yaml: 'yaml',
bot: {
username: 'test',
},
profilingToken: null,
staticAnalysisToken: null,
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,18 @@ describe('RepoState', () => {
ctx.data({
owner: {
repository: {
__typename: 'Repository',
activated,
defaultBranch: 'master',
private: true,
uploadToken: 'token',
graphToken: null,
yaml: 'yaml',
bot: {
username: 'test',
},
profilingToken: null,
staticAnalysisToken: null,
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,18 @@ describe('Tokens', () => {
ctx.data({
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'master',
private: true,
uploadToken: 'upload token',
graphToken: 'graph token',
yaml: 'yaml',
bot: {
username: 'test',
},
profilingToken: 'profiling token',
staticAnalysisToken: 'static analysis token',
graphToken: 'graph token',
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,18 @@ describe('TokensTeam', () => {
ctx.data({
owner: {
repository: {
__typename: 'Repository',
activated: true,
defaultBranch: 'master',
private: true,
uploadToken: 'upload token',
profilingToken: 'profiling token',
staticAnalysisToken: 'static analysis token',
graphToken: 'graph token',
yaml: 'yaml',
bot: {
username: 'test',
},
},
},
})
Expand Down
50 changes: 0 additions & 50 deletions src/services/repo/useRepoSettings.js

This file was deleted.

0 comments on commit cfb9ecb

Please sign in to comment.