-
Notifications
You must be signed in to change notification settings - Fork 5
Add function to remove app installation as a GitHub App #483
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
base: main
Are you sure you want to change the base?
Conversation
- Created TEMPLATE.ps1 for structuring Pester tests with common setup. - Added Teams.Tests.ps1 to test GitHub Teams API functionalities including team creation, retrieval, updating, and deletion. - Implemented Users.Tests.ps1 to validate user-related API calls such as fetching user details and updating user information. - Developed Variables.Tests.ps1 to test GitHub repository and organization variable management, including setting, updating, and removing variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality for uninstalling GitHub App installations, along with test infrastructure and configuration changes. The main focus is implementing proper cleanup mechanisms for GitHub App installations in organization contexts.
- Implements
Remove-GitHubAppInstallation
private function for deleting app installations via API - Enhances
Uninstall-GitHubApp
public function with improved parameter handling and installation deletion logic - Adds comprehensive test coverage for app installation cleanup in organization lifecycle tests
Reviewed Changes
Copilot reviewed 4 out of 17 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/functions/private/Apps/GitHub Apps/Remove-GitHubAppInstallation.ps1 |
New private function implementing GitHub API call to delete app installations |
src/functions/public/Apps/GitHub App/Uninstall-GitHubApp.ps1 |
Enhanced parameter set handling and added default parameter set for installation deletion |
tests/Organizations.Tests.ps1 |
Added pre-test and post-test cleanup logic for app installations in organization tests |
.github/PSModule.yml |
Uncommented configuration to skip various test components and documentation builds |
Comments suppressed due to low confidence (1)
tests/Organizations.Tests.ps1:174
- The test assertion should include a descriptive message to make test failures more informative. Consider adding '-Because' parameter to explain what this assertion validates.
$remainingInstallations | Should -BeNullOrEmpty
src/functions/private/Apps/GitHub Apps/Remove-GitHubAppInstallation.ps1
Outdated
Show resolved
Hide resolved
…or uninstalling GitHub Apps
3a099c6
to
a9f8063
Compare
… enhance GitHubAppContext with TokenExpiresIn property
…n GitHub context formatting
… in GitHub context formatting
…ds in GitHub context formatting
…n GitHub context formatting
…HubUnsignedJWT function
…d 10 minutes for 'APP' in GitHub context formatting
…b App installations
…eOrganization function to clarify it uninstalls from enterprise-owned organizations
…parameter handling for improved clarity and functionality
…y in Uninstall-GitHubApp function
…p for improved context handling
…e parameter in Organizations.Tests.ps1
Description
Type of change
Checklist