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: stop returning 400 code when user installs github app #314

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

joseph-sentry
Copy link
Contributor

Purpose/Motivation

Sometimes when a user tries to install the github app (on self-hosted), they will encounter a 400 response

Links to relevant tickets

Fixes: codecov/engineering-team#806

What does this PR do?

  • change return of get_redirection_url_from_state to tuple
  • if second element of tuple is False, it means that the state was not set and we should redirect to the dashboard without logging the user in

@codecov-staging
Copy link

codecov-staging bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c8657da) 95.98% compared to head (919cc12) 95.98%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #314   +/-   ##
=======================================
  Coverage   95.98%   95.98%           
=======================================
  Files         612      612           
  Lines       15794    15798    +4     
=======================================
+ Hits        15160    15164    +4     
  Misses        634      634           
Flag Coverage Δ
unit 95.98% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 95.98% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codecov-public-qa bot commented Dec 20, 2023

Codecov Report

Merging #314 (919cc12) into main (c8657da) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #314   +/-   ##
=======================================
  Coverage   95.98%   95.98%           
=======================================
  Files         612      612           
  Lines       15794    15798    +4     
=======================================
+ Hits        15160    15164    +4     
  Misses        634      634           
Flag Coverage Δ
unit 95.98% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 95.98% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
codecov_auth/views/base.py 99.49% <100.00%> (ø)
codecov_auth/views/github.py 98.13% <100.00%> (+0.03%) ⬆️
codecov_auth/views/gitlab.py 98.41% <100.00%> (+0.05%) ⬆️

Impacted file tree graph

@joseph-sentry joseph-sentry merged commit c3f5e7f into main Dec 20, 2023
18 of 19 checks passed
@joseph-sentry joseph-sentry deleted the joseph/fix-install-400 branch December 20, 2023 16:22
scott-codecov added a commit that referenced this pull request Dec 21, 2023
* main:
  feat: tokenless auth (part II) (#308)
  feat: tokenless auth (part I) (#304)
  fix: stop returning 400 code when user installs github app (#314)
  Always send to mkto (#313)
  feat: Bundle analysis upload endpoint (#299)
  Reduce db queries coming from health endpoint (#311)
scott-codecov added a commit that referenced this pull request Dec 21, 2023
* main:
  feat: tokenless auth (part II) (#308)
  feat: tokenless auth (part I) (#304)
  fix: stop returning 400 code when user installs github app (#314)
  Always send to mkto (#313)
  feat: Bundle analysis upload endpoint (#299)
  Reduce db queries coming from health endpoint (#311)
scott-codecov added a commit that referenced this pull request Dec 21, 2023
* main:
  feat: tokenless auth (part II) (#308)
  feat: tokenless auth (part I) (#304)
  fix: stop returning 400 code when user installs github app (#314)
  Always send to mkto (#313)
  feat: Bundle analysis upload endpoint (#299)
  Reduce db queries coming from health endpoint (#311)
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.

Installing GitHub App can result in 400 response
3 participants