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

Update flag select in pull request view to only show relevant flags #2531

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

rohitvinnakota-codecov
Copy link
Contributor

@rohitvinnakota-codecov rohitvinnakota-codecov commented Jan 23, 2024

Description

This PR closes codecov/engineering-team#823. Following up from codecov/codecov-api#350, we now only see relevant flags to the PR in the pull view. This uses the same query as in the flags tab.

The query used in the flags tab was modified to accept search terms to maintain behaviour in the Flags Select component

Screenshots

Screenshot 2024-01-26 at 2 48 44 PM

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.

@codecov-staging
Copy link

codecov-staging bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2531   +/-   ##
=======================================
  Coverage   98.35%   98.35%           
=======================================
  Files         813      813           
  Lines       10622    10631    +9     
  Branches     2704     2665   -39     
=======================================
+ Hits        10447    10456    +9     
  Misses        173      173           
  Partials        2        2           
Files Coverage Δ
src/services/repo/useRepoFlagsSelect.js 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 96.95% <ø> (ø)
Pages 99.28% <ø> (ø)
Services 99.56% <100.00%> (+<0.01%) ⬆️
Shared 99.82% <ø> (ø)
UI 94.23% <ø> (ø)

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 8b5b89b...e4939c7. Read the comment docs.

Copy link

codecov-public-qa bot commented Jan 23, 2024

Codecov Report

Merging #2531 (e4939c7) into main (8b5b89b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2531   +/-   ##
=======================================
  Coverage   98.35%   98.35%           
=======================================
  Files         813      813           
  Lines       10622    10631    +9     
  Branches     2693     2706   +13     
=======================================
+ Hits        10447    10456    +9     
  Misses        173      173           
  Partials        2        2           
Files Coverage Δ
src/services/repo/useRepoFlagsSelect.js 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 96.95% <ø> (ø)
Pages 99.28% <ø> (ø)
Services 99.56% <100.00%> (+<0.01%) ⬆️
Shared 99.82% <ø> (ø)
UI 94.23% <ø> (ø)

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 8b5b89b...e4939c7. Read the comment docs.

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e2ec9c0) 98.29% compared to head (979b858) 98.34%.
Report is 27 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2531     +/-   ##
=======================================
+ Coverage   98.29   98.34   +0.05     
=======================================
  Files        793     811     +18     
  Lines      10239   10570    +331     
  Branches    2532    2678    +146     
=======================================
+ Hits       10064   10395    +331     
  Misses       173     173             
  Partials       2       2             
Files Coverage Δ
src/services/repo/useRepoFlagsSelect.js 100.00% <100.00%> (ø)

... and 186 files with indirect coverage changes

Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 96.95% <ø> (ø)
Pages 99.27% <ø> (+0.01%) ⬆️
Services 99.56% <100.00%> (+0.06%) ⬆️
Shared 99.82% <ø> (+<0.01%) ⬆️
UI 94.23% <ø> (ø)

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 e2ec9c0...979b858. Read the comment docs.

Copy link

netlify bot commented Jan 23, 2024

Deploy Preview for gazebo-staging ready!

Name Link
🔨 Latest commit e4939c7
🔍 Latest deploy log https://app.netlify.com/sites/gazebo-staging/deploys/65c0edddb78e03000843a3e2
😎 Deploy Preview https://deploy-preview-2531--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.

@codecov-qa
Copy link

codecov-qa bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8b5b89b) 98.35% compared to head (e4939c7) 98.35%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2531   +/-   ##
=======================================
  Coverage   98.35%   98.35%           
=======================================
  Files         813      813           
  Lines       10622    10631    +9     
  Branches     2704     2663   -41     
=======================================
+ Hits        10447    10456    +9     
  Misses        173      173           
  Partials        2        2           
Files Coverage Δ
src/services/repo/useRepoFlagsSelect.js 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 96.95% <ø> (ø)
Pages 99.28% <ø> (ø)
Services 99.56% <100.00%> (+<0.01%) ⬆️
Shared 99.82% <ø> (ø)
UI 94.23% <ø> (ø)

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 8b5b89b...e4939c7. Read the comment docs.

@rohitvinnakota-codecov rohitvinnakota-codecov changed the title [Draft] Update flag select in pull request view to only show relevant flags Update flag select in pull request view to only show relevant flags Jan 26, 2024
@rohitvinnakota-codecov rohitvinnakota-codecov marked this pull request as ready for review January 26, 2024 19:49
@codecov-releaser
Copy link
Contributor

Visit https://preview-pr-2531.codecov.dev for your PR preview. Expires after 1 month automatically.

Copy link
Contributor

@nicholas-codecov nicholas-codecov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: Small tweak to determining how to choose which fetch function to use.

Comment on lines 125 to 142
const data = pullId
? fetchRepoFlagsForPull({
provider,
owner,
repo,
pullId,
signal,
filters,
after,
})
: fetchRepoFlags({
provider,
owner,
repo,
filters,
after,
signal,
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather then using a ternary here, can you swap to if statements with a default value. This will make it easier to add in the same for commits (I'm assuming that's going to be added) as well as making it easier to read.

Copy link
Contributor

@nicholas-codecov nicholas-codecov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rohitvinnakota-codecov rohitvinnakota-codecov merged commit 34f3dbe into main Feb 5, 2024
60 checks passed
@rohitvinnakota-codecov rohitvinnakota-codecov deleted the rvinnakota/flag-select-fix branch February 5, 2024 14:46
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.

Show pull specific flags in pull request page flags selector
3 participants