Skip to content

🩹 [Patch]: Update test to connect a GitHub App using Connect-GitHubApp #60

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

Merged
merged 4 commits into from
Jul 1, 2025

Conversation

MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Jul 1, 2025

Description

This pull request updates the .github/workflows/TestWorkflow.yml file to improve the organization and output formatting of GitHub-related logs in the workflow scripts. The most important changes include switching from Format-Table to Format-List for better readability, restructuring log groups for clarity, and replacing specific installation token-based connections with a streamlined Connect-GitHubApp command.

Improvements to output formatting:

  • Changed the output formatting from Format-Table to Format-List for Get-GitHubApp and Get-GitHubConfig commands to enhance readability. [1] [2]

Workflow restructuring:

  • Replaced the token-based connection logic (New-GitHubAppInstallationAccessToken and Connect-GitHub) with a simplified Connect-GitHubApp command to connect to all installations of the app. [1] [2]
  • Added new log groups for Contexts (Get-GitHubContext -ListAvailable) and GitHubConfig (Get-GitHubConfig) to improve clarity and organization of workflow logs. [1] [2]

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

@Copilot Copilot AI review requested due to automatic review settings July 1, 2025 18:00
@MariusStorhaug MariusStorhaug changed the title [Fix]: Update test to connect a GitHub App h Connect-GitHubApp 🩹 [Patch]: Update test to connect a GitHub App using Connect-GitHubApp Jul 1, 2025
@MariusStorhaug MariusStorhaug self-assigned this Jul 1, 2025
Copy link

@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 updates the test workflow to use the new Connect-GitHubApp wrapper, standardizes several output formats, and replaces manual installation token handling with a single command.

  • Switched Get-GitHubApp and Get-GitHubConfig outputs from table to list formatting
  • Removed manual token generation and Connect-GitHub calls in favor of Connect-GitHubApp
  • Added dedicated log groups for available contexts and GitHub configuration
Comments suppressed due to low confidence (3)

.github/workflows/TestWorkflow.yml:498

  • The Connect-GitHubApp call isn’t piped through Format-List or Out-String, so its output won’t be captured in the log group. Consider piping it to Format-List | Out-String for consistency with other blocks.
            LogGroup 'Connect to all installations of the app' {

.github/workflows/TestWorkflow.yml:503

  • [nitpick] Consider using Format-List here instead of Format-Table to match the list formatting used elsewhere and avoid table-wrapping issues in CI logs.
                Get-GitHubContext -ListAvailable | Format-Table -AutoSize | Out-String

.github/workflows/TestWorkflow.yml:533

  • [nitpick] This block is duplicated across multiple jobs. Extracting it into a reusable workflow snippet or composite action would reduce duplication and improve maintainability.
            LogGroup 'Connect to all installations of the app' {

@MariusStorhaug MariusStorhaug merged commit 8afae86 into main Jul 1, 2025
65 checks passed
@MariusStorhaug MariusStorhaug deleted the ConnectApp branch July 1, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant