codecov / codecov-api

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

add action to link users to accounts #696

Closed nora-codecov closed 2 months ago

nora-codecov commented 3 months ago

Purpose/Motivation

Gives us a method to do the initial setup when an Account is created. This action will create the link between the Account object and the User object for any Owner who is a plan_activated_user on any of the Organizations linked to the Account.

Can be run multiple times safely (in case it errors or times out) Won't do the link if the Account doesn't have enough seats

For "auditing" its behavior - it gives messages about how many Users and AccountUsers were created. You can see the Users linked to the Account on the Account edit page (when you click into an Account on the admin). You can remove a AccountUsers connection on the User admin page.

Links to relevant tickets

Uses https://github.com/codecov/shared/pull/295 part of https://github.com/codecov/engineering-team/issues/2058

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.65%. Comparing base (4fde36b) to head (b9f1a9a).

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

@@            Coverage Diff             @@
##             main     #696      +/-   ##
==========================================
+ Coverage   91.63%   91.65%   +0.02%     
==========================================
  Files         632      632              
  Lines       16872    16917      +45     
==========================================
+ Hits        15461    15506      +45     
  Misses       1411     1411              
Flag Coverage Δ
unit 91.65% <100.00%> (+0.02%) :arrow_up:
unit-latest-uploader 91.65% <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/admin.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.65%. Comparing base (4fde36b) to head (b9f1a9a).

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

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #696      +/-   ##
==========================================
+ Coverage   91.63%   91.65%   +0.02%     
==========================================
  Files         632      632              
  Lines       16872    16917      +45     
==========================================
+ Hits        15461    15506      +45     
  Misses       1411     1411              
Flag Coverage Δ
unit 91.65% <100.00%> (+0.02%) :arrow_up:
unit-latest-uploader 91.65% <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/admin.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.98%. Comparing base (4fde36b) to head (b9f1a9a).

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #696 +/- ## =========================================== Coverage 95.98000 95.98000 =========================================== Files 812 812 Lines 18209 18254 +45 =========================================== + Hits 17477 17522 +45 Misses 732 732 ``` | [Flag](https://app.codecov.io/gh/codecov/codecov-api/pull/696/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/696/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `91.65% <100.00%> (+0.02%)` | :arrow_up: | | [unit-latest-uploader](https://app.codecov.io/gh/codecov/codecov-api/pull/696/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `91.65% <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.

nora-codecov commented 2 months ago

updated and added based on @adrian-codecov and @michelletran-codecov feedback! ty for the comments ❤️