Skip to content

Conversation

MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Jun 10, 2025

Description

This pull request includes a small change to the Get-GitHubAppInstallableOrganization.ps1 function. The change modifies how the Response object is processed, ensuring that each item in the response is properly converted into a GitHubOrganization object.

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

@MariusStorhaug MariusStorhaug self-assigned this Jun 10, 2025
@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 06:55
@MariusStorhaug MariusStorhaug requested a review from a team as a code owner June 10, 2025 06:55
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 fixes the processing of the Response object in the Get-GitHubAppInstallableOrganization function so that each item is individually converted into a GitHubOrganization object.

  • Modified conversion logic to iterate over each element in the Response.
  • Ensured that the transformation now leverages ForEach-Object on the Response collection.
Comments suppressed due to low confidence (1)

src/functions/private/Apps/GitHub Apps/Get-GitHubAppInstallableOrganization.ps1:50

  • Ensure that $_.Response is always an enumerable. If there is a chance that a single object might be returned, consider wrapping the item with @() to guarantee consistent iteration.
$_.Response | ForEach-Object { [GitHubOrganization]::new($_) }

@MariusStorhaug MariusStorhaug changed the title 🩹 [Patch]: Update Get-GitHubAppInstallableOrganization to handle mu… 🩹 [Patch]: Update Get-GitHubAppInstallableOrganization to handle array of objects Jun 10, 2025
@MariusStorhaug MariusStorhaug changed the title 🩹 [Patch]: Update Get-GitHubAppInstallableOrganization to handle array of objects 🪲 [Fix]: Update Get-GitHubAppInstallableOrganization to handle array of objects Jun 10, 2025
@MariusStorhaug MariusStorhaug merged commit 413bc5c into main Jun 10, 2025
10 checks passed
@MariusStorhaug MariusStorhaug deleted the fixOrg branch June 10, 2025 08:37
Copy link
Contributor

Module GitHub - 0.29.5 published to the PowerShell Gallery.

Copy link
Contributor

GitHub release for GitHub v0.29.5 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.

🪲[Bug]: Get-GitHubOrganization -Enterprise <...> fails with ID mapping
1 participant