Skip to content

Conversation

MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Jul 4, 2025

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.

New functionality for GitHub Enterprise management:

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 of Get-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 set CodeCoverage.PercentTarget to 0.

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

- 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.
@MariusStorhaug MariusStorhaug self-assigned this Jul 4, 2025
@Copilot Copilot AI review requested due to automatic review settings July 4, 2025 12:01
@MariusStorhaug MariusStorhaug requested a review from a team as a code owner July 4, 2025 12:01
Copy link
Contributor

@Copilot Copilot AI left a 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 and GitHubEnterprise 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.
MariusStorhaug and others added 2 commits July 4, 2025 14:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@MariusStorhaug MariusStorhaug merged commit 12903bc into main Jul 4, 2025
11 checks passed
@MariusStorhaug MariusStorhaug deleted the Enterprise branch July 4, 2025 19:31
@github-project-automation github-project-automation bot moved this from Todo to Done in GitHub PowerShell Module Jul 4, 2025
Copy link
Contributor

github-actions bot commented Jul 4, 2025

Module GitHub - 0.33.6 published to the PowerShell Gallery.

Copy link
Contributor

github-actions bot commented Jul 4, 2025

GitHub release for GitHub v0.33.6 has been created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🚀[Feature]: Add functions to Get-GitHubEnterprise
1 participant