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

feat: Update usePrefetchCommitFileEntry to Accept Flags Argument #2290

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR updates the usePrefetchCommitEntryFile to accept a flags argument to be passed along as a GraphQL variable. It also includes some updates to TypeScript as well as moving from repositoryDeprecated to repository.

Closes codecov/engineering-team#342

Notable Changes

  • Update usePrefetchCommitEntryFile to accept flags argument, refactor to TypeScript, move from repositoryDeprecated to repository.
  • Update query and create zod schemas for prefetching file details
  • Update CommitFileEntry to pull out flags from filters prop
  • Update tests

@codecov-staging
Copy link

codecov-staging bot commented Sep 26, 2023

Codecov Report

Merging #2290 (b48a951) into main (933ee9a) will increase coverage by 4.47%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2290      +/-   ##
==========================================
+ Coverage   93.54%   98.02%   +4.47%     
==========================================
  Files         702      704       +2     
  Lines        8182     8207      +25     
  Branches     1967     1932      -35     
==========================================
+ Hits         7654     8045     +391     
+ Misses        523      160     -363     
+ Partials        5        2       -3     
Files Coverage Δ
...ontents/commit/file/usePrefetchCommitFileEntry.tsx 100.00% <100.00%> (ø)
src/services/pathContents/constants.ts 100.00% <100.00%> (ø)
...ble/TableEntries/CommitEntries/CommitFileEntry.jsx 100.00% <100.00%> (ø)

... and 42 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 933ee9a...b48a951. Read the comment docs.

@codecov-public-qa
Copy link

codecov-public-qa bot commented Sep 26, 2023

Codecov Report

Merging #2290 (b48a951) into main (933ee9a) will decrease coverage by 0.13%.
The diff coverage is 17.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2290      +/-   ##
==========================================
- Coverage   34.29%   34.17%   -0.13%     
==========================================
  Files         655      655              
  Lines        8039     8059      +20     
  Branches     1924     1963      +39     
==========================================
- Hits         2757     2754       -3     
- Misses       5259     5276      +17     
- Partials       23       29       +6     
Files Changed Coverage Δ
...ontents/commit/file/usePrefetchCommitFileEntry.tsx 0.00% <0.00%> (ø)
...ble/TableEntries/CommitEntries/CommitFileEntry.jsx 20.00% <0.00%> (-5.00%) ⬇️
src/services/pathContents/constants.ts 100.00% <100.00%> (ø)

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 933ee9a...b48a951. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #2290 (b48a951) into main (933ee9a) will increase coverage by 4.48%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2290     +/-   ##
=======================================
+ Coverage   93.55   98.03   +4.48     
=======================================
  Files        702     704      +2     
  Lines       8182    8207     +25     
  Branches    1957    1980     +23     
=======================================
+ Hits        7654    8045    +391     
+ Misses       523     160    -363     
+ Partials       5       2      -3     
Files Coverage Δ
...ontents/commit/file/usePrefetchCommitFileEntry.tsx 100.00% <100.00%> (ø)
src/services/pathContents/constants.ts 100.00% <100.00%> (ø)
...ble/TableEntries/CommitEntries/CommitFileEntry.jsx 100.00% <100.00%> (ø)

... and 42 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 933ee9a...b48a951. Read the comment docs.

@netlify
Copy link

netlify bot commented Sep 26, 2023

Deploy Preview for gazebo-staging ready!

Name Link
🔨 Latest commit b48a951
🔍 Latest deploy log https://app.netlify.com/sites/gazebo-staging/deploys/6515804f76e0850008708baa
😎 Deploy Preview https://deploy-preview-2290--gazebo-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@adrian-codecov
Copy link
Contributor

adrian-codecov commented Sep 27, 2023

Lgtm, and confirmed flags are included when you fire the prefetch hook 👌

Screenshot 2023-09-27 at 9 30 45 AM

@nicholas-codecov nicholas-codecov merged commit 9e75c2b into main Sep 28, 2023
29 of 31 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-eng-342-feat-update-usePrefetchCommitFileEntry-to-accept-filters-argument branch September 28, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update usePrefetchCommitFileEntry to Accept Flags Argument
2 participants