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

Add Suspended Installation Properties to GHAppInstallation #1780

Merged

Conversation

gilday
Copy link
Contributor

@gilday gilday commented Jan 15, 2024

Description

A suspended app installation has suspended_at and suspended_by properties that were missing from the GHAppInstallation class.

https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#list-installations-for-the-authenticated-app

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These properties are represented in the current test data, but they are always null. To record examples of suspended installations, it's my understanding that a test would need to suspend an installation on the hub4j-test-org, and doing so requires admin level access to the org. This sounds prohibitively difficult to contribute. Please advise if there's a good way to test these changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could manually add test datafiles or I can grant you admin access to the org, whichever you would rather do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the tests and test files.

@gilday gilday marked this pull request as ready for review January 16, 2024 11:26
Copy link
Member

@bitwiseman bitwiseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that adding tests for fields like these is difficult, but they need to be covered. If they aren't a future change could silent break this functionality.

@gilday gilday force-pushed the feature/app-installation-suspended-properties branch from cfb3182 to bfcd88f Compare February 26, 2024 03:22
@gilday gilday requested a review from bitwiseman February 26, 2024 03:24
@gilday gilday force-pushed the feature/app-installation-suspended-properties branch from 1ae2653 to d9a5602 Compare March 7, 2024 18:11
A suspended app installation has suspended_at and suspended_by properties that were missing from the GHAppInstallation class.
@gilday gilday force-pushed the feature/app-installation-suspended-properties branch from d9a5602 to a022756 Compare March 8, 2024 21:10
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.69%. Comparing base (a1499d7) to head (726ace5).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1780   +/-   ##
=========================================
  Coverage     80.69%   80.69%           
- Complexity     2330     2332    +2     
=========================================
  Files           220      220           
  Lines          7049     7051    +2     
  Branches        372      372           
=========================================
+ Hits           5688     5690    +2     
  Misses         1128     1128           
  Partials        233      233           

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

@bitwiseman bitwiseman merged commit ddbbc7a into hub4j:main Mar 8, 2024
11 checks passed
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.

2 participants