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: Add firstPull resolver to GraphQL pull type #108

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

scott-codecov
Copy link
Contributor

Purpose/Motivation

In the UI we'd like to show slightly different messaging for 1st time pulls.

Links to relevant tickets

codecov/engineering-team#388

What does this PR do?

Adds a new firstPull resolver to the GraphQL Pull type. The resolver will return true when the given pull is (or was) the 1st pull for a repo. There's no time-dependent aspect here - the value of firstPull will stay the same for the lifetime of the pull. UI side, if it makes sense to no longer show the 1st time experience copy, etc. then you could also check for the pull.state == "merged"

@codecov-staging
Copy link

codecov-staging bot commented Sep 6, 2023

Codecov Report

Patch coverage is 100.00% of modified lines.

Files Changed Coverage
graphql_api/types/pull/pull.py 100.00%

📢 Thoughts on this report? Let us know!.

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #108 (537b599) into main (de753e3) will not change coverage.
The diff coverage is 100.00%.

@@          Coverage Diff          @@
##            main    #108   +/-   ##
=====================================
  Coverage   95.29   95.29           
=====================================
  Files        702     702           
  Lines      14895   14899    +4     
=====================================
+ Hits       14194   14198    +4     
  Misses       701     701           
Flag Coverage Δ
unit 95.22% <100.00%> (?)
unit-latest-uploader 95.22% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
graphql_api/types/pull/pull.py 100.00% <100.00%> (ø)

@scott-codecov scott-codecov merged commit dc288f8 into main Sep 8, 2023
12 checks passed
@scott-codecov scott-codecov deleted the scott/first-pull branch September 8, 2023 17:08
scott-codecov added a commit that referenced this pull request Sep 13, 2023
* main: (58 commits)
  Adding beginnings of GHA CI (#127)
  feat: Filter flags by flags for pathContents (#128)
  Create checkbox in Owner form in Django admin to set uses_invoice (#109)
  build(deps): bump certifi from 2020.6.20 to 2023.7.22 (#32)
  Feature/no compile (#126)
  Bump django from 4.2.2 to 4.2.3 (#42)
  Don't compile since source is available (#106)
  feat: Add firstPull resolver to GraphQL pull type (#108)
  chore: Upgrade requests and redis dependencies (#124)
  Update LICENSE (#122)
  Attempt migration (#121)
  359 adjust monthly uploads for trialled customers (#119)
  Add changes for monthly uploads to account for trialing customer (#101)
  Adjust donwload_url link (#115)
  update to handle to redirects (#113)
  fix: Include impacted files with no coverage diff and no indirect changes in direct changes list (#114)
  Make uses_invoice field on Owner(#92)
  feat: support gh refresh tokens (#85)
  Add RiskyAlterField to utils/migrations (#93)
  Fix/config error enterprise (#107)
  ...
scott-codecov added a commit that referenced this pull request Sep 13, 2023
* main: (58 commits)
  Adding beginnings of GHA CI (#127)
  feat: Filter flags by flags for pathContents (#128)
  Create checkbox in Owner form in Django admin to set uses_invoice (#109)
  build(deps): bump certifi from 2020.6.20 to 2023.7.22 (#32)
  Feature/no compile (#126)
  Bump django from 4.2.2 to 4.2.3 (#42)
  Don't compile since source is available (#106)
  feat: Add firstPull resolver to GraphQL pull type (#108)
  chore: Upgrade requests and redis dependencies (#124)
  Update LICENSE (#122)
  Attempt migration (#121)
  359 adjust monthly uploads for trialled customers (#119)
  Add changes for monthly uploads to account for trialing customer (#101)
  Adjust donwload_url link (#115)
  update to handle to redirects (#113)
  fix: Include impacted files with no coverage diff and no indirect changes in direct changes list (#114)
  Make uses_invoice field on Owner(#92)
  feat: support gh refresh tokens (#85)
  Add RiskyAlterField to utils/migrations (#93)
  Fix/config error enterprise (#107)
  ...
scott-codecov added a commit that referenced this pull request Sep 14, 2023
* main: (74 commits)
  Fix indentation error (#133)
  Add cache cleanup (#130)
  Feature/lint pre commit (#134)
  feat: trigger label analysis task after update (#131)
  Filter file comparisons by flags (#129)
  chore: Remove hard-coded dev BB redirect URL (#132)
  feat: Validate OIDC ID token during Sentry OAuth flow (#52)
  Adding beginnings of GHA CI (#127)
  feat: Filter flags by flags for pathContents (#128)
  Create checkbox in Owner form in Django admin to set uses_invoice (#109)
  build(deps): bump certifi from 2020.6.20 to 2023.7.22 (#32)
  Feature/no compile (#126)
  Bump django from 4.2.2 to 4.2.3 (#42)
  Don't compile since source is available (#106)
  feat: Add firstPull resolver to GraphQL pull type (#108)
  chore: Upgrade requests and redis dependencies (#124)
  Update LICENSE (#122)
  Attempt migration (#121)
  359 adjust monthly uploads for trialled customers (#119)
  Add changes for monthly uploads to account for trialing customer (#101)
  ...
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.

Api returns whether a PR is the 1st pull for a repo
2 participants