-
Notifications
You must be signed in to change notification settings - Fork 17
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: Handle first pull request experience #2288
Conversation
…2283) Update queries and zod schemas to handle FirstPullRequest on comparison.
Update the useCommit and useCompareTotals hook to typescript, use the repository gql field, and accept a filters argument to pass along with the query. Create a new typesafe mapEdges function. GH codecov/engineering-team#343
Codecov Report
@@ Coverage Diff @@
## main #2288 +/- ##
=======================================
Coverage 98.01% 98.02%
=======================================
Files 703 704 +1
Lines 8178 8195 +17
Branches 1924 1977 +53
=======================================
+ Hits 8016 8033 +17
Misses 160 160
Partials 2 2
Continue to review full report in Codecov by Sentry.
|
Codecov Report
@@ Coverage Diff @@
## main #2288 +/- ##
=====================================
Coverage 98.02 98.02
=====================================
Files 703 704 +1
Lines 8178 8195 +17
Branches 1965 1977 +12
=====================================
+ Hits 8016 8033 +17
Misses 160 160
Partials 2 2
Continue to review full report in Codecov by Sentry.
|
✅ Deploy Preview for gazebo-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
@@ Coverage Diff @@
## main #2288 +/- ##
==========================================
- Coverage 34.32% 34.26% -0.07%
==========================================
Files 654 655 +1
Lines 8030 8047 +17
Branches 1922 1970 +48
==========================================
+ Hits 2756 2757 +1
- Misses 5251 5261 +10
- Partials 23 29 +6
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
✅ Deploy Preview for gazebo-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some smol qs
@@ -68,7 +68,6 @@ query PullPageData($owner: String!, $repo: String!, $pullId: Int!) { | |||
repository(name: $repo) { | |||
__typename | |||
... on Repository { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming we no longer use private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, i just missed it when i cleaned up the use of current user part of org
src/pages/PullRequestPage/subroute/FilesChangedTab/FilesChangedTab.jsx
Outdated
Show resolved
Hide resolved
|
||
if (isLoading) { | ||
return <Loader /> | ||
} | ||
|
||
if (isFirstPull) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen Nick start to do some of the error handling at the hook level, for example here https://github.com/codecov/gazebo/blob/main/src/services/pulls/usePulls.tsx#L235, that I think it's a nice way to clean up the react code we see. I don't think this is necessarily the time to make this change here since you'd have some error handling at the hook level and the rest here, but more of a food for thought to keep this in mind for future work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm nice, could be good to clean up later
provider: string | ||
owner: string | ||
repo: string | ||
pullId: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't pullId an int
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not in the query params
Description
Mostly meant to identify the first PR in the pull request page, display the welcome banner, handle the new type in files changed and indirect changed tab.
Notable Changes
Note
Waiting on Kyle's review for some copy things
Screenshots
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.