-
Notifications
You must be signed in to change notification settings - Fork 4
🩹 [Patch]: Add URL generation and default formatting for GitHubAppInstallations #443
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
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
GitHubAppInstallations
…e output type documentation in related functions
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 URL generation support for GitHubAppInstallation
objects and provides default formatting views.
- Introduces a new
Url
property and updates constructors inGitHubAppInstallation.ps1
to generate profile and installation URLs. - Updates organization and enterprise cmdlets to emit
GitHubAppInstallation
and pass a custom hostname. - Adds
GitHubAppInstallation.Format.ps1xml
with table and list views that hyperlink properties.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
src/functions/private/Apps/GitHub Apps/Get-GitHubOrganizationAppInstallation.ps1 | Added .OUTPUTS comment documenting the output type. |
src/functions/private/Apps/GitHub Apps/Get-GitHubEnterpriseOrganizationAppInstallation.ps1 | Added .OUTPUTS and updated the loop to iterate over response data and include hostname in constructor. |
src/formats/GitHubAppInstallation.Format.ps1xml | Created table and list views for GitHubAppInstallation , including hyperlink formatting. |
src/classes/public/App/GitHubAppInstallation.ps1 | Added Url property and updated constructors to generate URLs based on target type and hostname. |
Comments suppressed due to low confidence (1)
src/functions/private/Apps/GitHub Apps/Get-GitHubEnterpriseOrganizationAppInstallation.ps1:64
- Changed iteration target from
$.Response.installations
to$.Response
may break if the API still returns aninstallations
property; verify the response schema and update the loop to avoid missing items.
foreach ($installation in $_.Response) {
src/functions/private/Apps/GitHub Apps/Get-GitHubOrganizationAppInstallation.ps1
Show resolved
Hide resolved
Module GitHub - 0.32.3 published to the PowerShell Gallery. |
GitHub release for GitHub v0.32.3 has been created. |
This pull request introduces enhancements to the
GitHubAppInstallation
class, updates related functions to support new features, and adds a new format configuration for displayingGitHubAppInstallation
objects. The changes improve the handling of URLs, streamline object creation, and enhance the output formatting for better usability.GitHubAppInstallations
#442Enhancements to
GitHubAppInstallation
class:$Url
property to store the profile URL of the target based on its type, and updated the constructor to populate this property usinghtml_url
from the API response.$Target
property to includeName
,Type
, andUrl
, dynamically constructing the URL based on theHostName
parameter.$Url
property to provide a direct link to the installation settings page using theHostName
,Type
, andTarget
.Format configuration for
GitHubAppInstallation
:GitHubAppInstallation
objects. The table view includes hyperlinks forID
andTarget.Name
when supported, and the list view includes all relevant properties such asUrl
,Permissions
, andEvents
.Updates to related functions:
Get-GitHubEnterpriseOrganizationAppInstallation
to pass theHostName
parameter when creatingGitHubAppInstallation
objects, and defined the.OUTPUTS
section to specify the output type.Get-GitHubOrganizationAppInstallation
to define the.OUTPUTS
section, specifying that the function outputsGitHubAppInstallation
objects.