-
Notifications
You must be signed in to change notification settings - Fork 4
🩹 [Patch]: Add function to Get-GitHubEnterprise
#460
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
Conversation
- Created TEMPLATE.ps1 for Pester tests with default configurations. - Added Teams.Tests.ps1 to test GitHub Teams API functionalities. - Introduced Users.Tests.ps1 for testing user-related GitHub API calls. - Developed Variables.Tests.ps1 to validate GitHub variable management. - Updated AuthCases.ps1 with new authentication scenarios for testing. - Implemented Enterprise.ps1 to test enterprise-specific GitHub API functionalities.
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 support for managing GitHub Enterprise entities by introducing new classes and a retrieval function, alongside extending test coverage for the enterprise scenarios and tweaking CI configurations.
- Introduces
GitHubBillingInfo
andGitHubEnterprise
classes to model billing and enterprise data. - Adds
Get-GitHubEnterprise
function to fetch enterprise details via GraphQL. - Expands Pester tests for enterprise use cases and updates test config to skip certain modules and set coverage to 0%.
Reviewed Changes
Copilot reviewed 6 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/classes/public/GitHubBillingInfo.ps1 | Defines new class to encapsulate billing-related metrics. |
src/classes/public/Owner/GitHubOwner/GitHubEnterprise.ps1 | Defines new Enterprise class extending owner metadata. |
src/functions/public/Enterprise/Get-GitHubEnterprise.ps1 | Implements function to retrieve enterprise details. |
tests/Data/AuthCases.ps1 | Adjusts authentication test cases to include enterprise. |
tests/Enterprise.ps1 | Adds Pester tests for Get-GitHubEnterprise functionality. |
.github/PSModule.yml | Updates CI config to skip modules and reset coverage target. |
Comments suppressed due to low confidence (1)
tests/Enterprise.ps1:26
- [nitpick] The
Describe
block is still named'Template'
. Update it to reflect the actual feature, e.g.,'Get-GitHubEnterprise Tests'
, for clearer test reporting.
Describe 'Template' {
- 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. - Introduced Users.Tests.ps1 to validate user-related API calls, including user retrieval and updates. - Implemented Variables.Tests.ps1 to cover GitHub variable management, including organization and repository variables, with comprehensive test cases for setting, updating, and removing variables.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Module GitHub - 0.33.6 published to the PowerShell Gallery. |
GitHub release for GitHub v0.33.6 has been created. |
Description
This pull request introduces significant enhancements to the PowerShell module by adding new functionality for GitHub Enterprise management, improving test coverage, and updating configurations. The most important changes include the addition of new classes to represent enterprise and billing information, a new function to retrieve enterprise details, and comprehensive tests for enterprise-related functionality.
Get-GitHubEnterprise
#458New functionality for GitHub Enterprise management:
src/classes/public/GitHubBillingInfo.ps1
: Added a newGitHubBillingInfo
class to encapsulate billing-related details such as storage usage, bandwidth usage, and license counts.src/classes/public/Owner/GitHubOwner/GitHubEnterprise.ps1
: Added a newGitHubEnterprise
class to represent enterprise-level details, including metadata, billing information, and readme content.src/functions/public/Enterprise/Get-GitHubEnterprise.ps1
: Introduced a newGet-GitHubEnterprise
function to retrieve detailed information about a GitHub Enterprise instance by name (slug).Test coverage improvements:
tests/Data/AuthCases.ps1
: Updated authentication test cases to include enterprise-specific scenarios. [1] [2]tests/Enterprise.ps1
: Added new tests to verify the functionality ofGet-GitHubEnterprise
and validate enterprise-related data, including billing information and metadata.Configuration updates:
.github/PSModule.yml
: Updated the test configuration to skip certain tests and setCodeCoverage.PercentTarget
to0
.Type of change
Checklist