Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove repositoryDeprecated from path contents hooks #2845

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const server = setupServer()
const mockNoFiles = {
username: 'nicholas-codecov',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand All @@ -34,6 +35,7 @@ const mockNoFiles = {
const mockMissingCoverage = {
username: 'nicholas-codecov',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand All @@ -48,6 +50,7 @@ const mockMissingCoverage = {
const mockUnknownPath = {
username: 'nicholas-codecov',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand All @@ -62,6 +65,7 @@ const mockUnknownPath = {
const mockTreeData = {
username: 'codecov-tree',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand All @@ -87,6 +91,7 @@ const mockTreeData = {
const mockTreeDataNested = {
username: 'codecov-tree',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand All @@ -113,6 +118,7 @@ const mockTreeDataNested = {
const mockNoHeadReport = {
username: 'nicholas-codecov',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const server = setupServer()
const mockNoFiles = {
username: 'nicholas-codecov',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand All @@ -34,6 +35,7 @@ const mockNoFiles = {
const mockUnknownPath = {
username: 'nicholas-codecov',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand All @@ -48,6 +50,7 @@ const mockUnknownPath = {
const mockMissingCoverage = {
username: 'nicholas-codecov',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand All @@ -62,6 +65,7 @@ const mockMissingCoverage = {
const mockListData = {
username: 'nicholas-codecov',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand All @@ -88,6 +92,7 @@ const mockListData = {
const mockNoHeadReport = {
username: 'nicholas-codecov',
repository: {
__typename: 'Repository',
branch: {
head: {
pathContents: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { useRepoBranchContentsTable } from './useRepoBranchContentsTable'
const mockBranchContentData = {
owner: {
repository: {
__typename: 'Repository',
repositoryConfig: {
indicationRange: {
upperRange: 80,
Expand Down Expand Up @@ -54,6 +55,7 @@ const mockBranchContentData = {
const mockCommitNoContentData = {
owner: {
repository: {
__typename: 'Repository',
repositoryConfig: {
indicationRange: {
upperRange: 80,
Expand Down
48 changes: 0 additions & 48 deletions src/services/pathContents/branch/dir/constants.js

This file was deleted.

57 changes: 57 additions & 0 deletions src/services/pathContents/branch/dir/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
export const query = `
query BranchContents(
$name: String!
$repo: String!
$branch: String!
$path: String!
$filters: PathContentsFilters!
) {
owner(username: $name) {
username
repository(name: $repo) {
__typename
... on Repository {
repositoryConfig {
indicationRange {
upperRange
lowerRange
}
}
branch(name: $branch) {
head {
pathContents(path: $path, filters: $filters) {
__typename
... on PathContents {
results {
__typename
hits
misses
partials
lines
name
path
percentCovered
... on PathContentFile {
isCriticalFile
}
}
}
... on UnknownPath {
message
}
... on MissingCoverage {
message
}
}
}
}
}
... on NotFoundError {
message
}
... on OwnerNotActivatedError {
message
}
}
}
}`
56 changes: 0 additions & 56 deletions src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.js

This file was deleted.

Loading
Loading