codecov / codecov-api

Code for the API of Codecov
Other
216 stars 30 forks source link

[Okta Login] Part 1: Refactoring existing Okta code #691

Closed michelletran-codecov closed 2 months ago

michelletran-codecov commented 3 months ago

Purpose/Motivation

Refactoring this so that it is more easily shared. Split this from part 2 to make reviewing both parts easier. See Part 2 for more context in how this refactor will be used.

Links to relevant tickets

https://github.com/codecov/engineering-team/issues/1988

What does this PR do?

This moves some of the shared code that will be common in all Okta implementations to a new mixin that can be shared across both Views.

Notes to Reviewer

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-notifications[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:white_check_mark: All tests successful. No failed tests found.

:loudspeaker: Thoughts on this report? Let us know!

codecov-qa[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.63%. Comparing base (f3d4bdc) to head (265ee29).

:white_check_mark: All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main     #691      +/-   ##
==========================================
+ Coverage   91.60%   91.63%   +0.02%     
==========================================
  Files         631      632       +1     
  Lines       16841    16860      +19     
==========================================
+ Hits        15428    15449      +21     
+ Misses       1413     1411       -2     
Flag Coverage Δ
unit 91.63% <100.00%> (+0.02%) :arrow_up:
unit-latest-uploader 91.63% <100.00%> (+0.02%) :arrow_up:

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

Files Coverage Δ
codecov_auth/views/okta.py 100.00% <100.00%> (+1.90%) :arrow_up:
codecov_auth/views/okta_mixin.py 100.00% <100.00%> (ø)

:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

codecov-public-qa[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.63%. Comparing base (f3d4bdc) to head (265ee29).

:white_check_mark: All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #691      +/-   ##
==========================================
+ Coverage   91.60%   91.63%   +0.02%     
==========================================
  Files         631      632       +1     
  Lines       16841    16860      +19     
==========================================
+ Hits        15428    15449      +21     
+ Misses       1413     1411       -2     
Flag Coverage Δ
unit 91.63% <100.00%> (+0.02%) :arrow_up:
unit-latest-uploader 91.63% <100.00%> (+0.02%) :arrow_up:

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

Files Coverage Δ
codecov_auth/views/okta.py 100.00% <100.00%> (+1.90%) :arrow_up:
codecov_auth/views/okta_mixin.py 100.00% <100.00%> (ø)

Impacted file tree graph

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.97%. Comparing base (f3d4bdc) to head (265ee29).

:white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #691 +/- ## =========================================== Coverage 95.97000 95.97000 =========================================== Files 811 812 +1 Lines 18178 18197 +19 =========================================== + Hits 17446 17465 +19 Misses 732 732 ``` | [Flag](https://app.codecov.io/gh/codecov/codecov-api/pull/691/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/codecov/codecov-api/pull/691/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `91.63% <100.00%> (+0.02%)` | :arrow_up: | | [unit-latest-uploader](https://app.codecov.io/gh/codecov/codecov-api/pull/691/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `91.63% <100.00%> (+0.02%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.