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

extend ghapp model #407

Merged
merged 2 commits into from
Feb 20, 2024
Merged

extend ghapp model #407

merged 2 commits into from
Feb 20, 2024

Conversation

giovanni-guidini
Copy link
Contributor

Includes an app_id and pem_path fields to GithubAppInstallation
These will be used to manage multiple apps for the same user.
They are needed to get a token for the app with github see here

The app_id we can get from installation webhooks.
The pem_path needs to be configured by the user, and should be
a URI pointing to some PEM file for that app.

context: codecov/engineering-team#1146

Purpose/Motivation

What is the feature? Why is this being done?

Links to relevant tickets

What does this PR do?

Include a brief description of the changes in this PR. Bullet points are your friend.

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

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.

Includes an `app_id` and `pem_path` fields to `GithubAppInstallation`
These will be used to manage multiple apps for the same user.
They are needed to get a token for the app with github [see here](https://github.com/codecov/shared/blob/8e3e4462c3d8e60e257b6725310c1c653f692a90/shared/github/__init__.py#L46)

The `app_id` we can get from installation webhooks.
The `pem_path` needs to be configured by the user, and should be
a URI pointing to some PEM file for that app.

context: codecov/engineering-team#1146
@giovanni-guidini giovanni-guidini requested a review from a team as a code owner February 19, 2024 15:04
giovanni-guidini added a commit that referenced this pull request Feb 19, 2024
Changes the GithubAppInstallation model to match api's.

Depends on #407
giovanni-guidini added a commit to codecov/worker that referenced this pull request Feb 19, 2024
Bring the GithubAppInstallation model to parity with api's
Depends on codecov/codecov-api#407
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5286410) 95.76% compared to head (08896b4) 95.76%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #407   +/-   ##
=====================================
  Coverage   95.76   95.76           
=====================================
  Files        752     752           
  Lines      17101   17101           
=====================================
  Hits       16376   16376           
  Misses       725     725           
Flag Coverage Δ
unit ?
unit-latest-uploader ?

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.

@codecov-staging
Copy link

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 Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c1cecfa) 96.08% compared to head (0630b67) 96.08%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #407   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files         636      637    +1     
  Lines       16583    16589    +6     
=======================================
+ Hits        15933    15939    +6     
  Misses        650      650           
Flag Coverage Δ
unit 96.08% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.08% <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 Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c1cecfa) 96.08% compared to head (0630b67) 96.08%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #407   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files         636      637    +1     
  Lines       16583    16589    +6     
=======================================
+ Hits        15933    15939    +6     
  Misses        650      650           
Flag Coverage Δ
unit 96.08% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.08% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
...ions/0052_githubappinstallation_app_id_and_more.py 100.00% <100.00%> (ø)
codecov_auth/models.py 98.94% <100.00%> (+<0.01%) ⬆️

Impacted file tree graph

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c1cecfa) 95.76% compared to head (08896b4) 95.76%.

❗ Current head 08896b4 differs from pull request most recent head 0630b67. Consider uploading reports for the commit 0630b67 to get more accurate results

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #407   +/-   ##
=====================================
  Coverage   95.76   95.76           
=====================================
  Files        752     753    +1     
  Lines      17103   17107    +4     
=====================================
+ Hits       16378   16382    +4     
  Misses       725     725           
Flag Coverage Δ
unit 96.08% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.08% <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.

@giovanni-guidini giovanni-guidini merged commit b59d61e into main Feb 20, 2024
16 of 17 checks passed
@giovanni-guidini giovanni-guidini deleted the gio/multiple-gh-apps branch February 20, 2024 15:40
giovanni-guidini added a commit to codecov/worker that referenced this pull request Feb 20, 2024
Bring the GithubAppInstallation model to parity with api's
Depends on codecov/codecov-api#407
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.

None yet

2 participants