Skip to content

Conversation

MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Sep 16, 2025

Description

This pull request updates the Secrets.Tests.ps1 test suite to improve how the Get-GitHubPublicKey command is tested for different organization plans and makes a minor formatting change to a log message.

Test logic improvements for organization plan handling:

  • Updated the Get-GitHubPublicKey -Type codespaces test to conditionally expect a throw for organizations on the 'free' plan, and to run the usual public key retrieval for other plans. This ensures the test behaves correctly based on the organization's plan type.

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 Sep 16, 2025
@Copilot Copilot AI review requested due to automatic review settings September 16, 2025 16:00
@MariusStorhaug MariusStorhaug requested a review from a team as a code owner September 16, 2025 16:00
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 test logic for the Get-GitHubPublicKey -Type codespaces command to handle different organization plans correctly and makes a minor formatting improvement to a log message.

  • Updates test to conditionally expect failures for organizations on the 'free' plan when testing codespaces public key retrieval
  • Adds proper handling for organizations with paid plans to run normal public key retrieval tests
  • Changes double quotes to single quotes in a log message for consistency
Comments suppressed due to low confidence (1)

tests/Secrets.Tests.ps1:609

  • The closing braces at lines 126-127 appear to be incorrectly nested. There should only be one closing brace to match the 'It' block that started at line 112, but this creates two additional closing braces that don't match any opening constructs.
    }
}

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MariusStorhaug MariusStorhaug merged commit e66d934 into main Sep 17, 2025
137 of 145 checks passed
@MariusStorhaug MariusStorhaug deleted the Fix branch September 17, 2025 07:23
Copy link
Contributor

Module GitHub - 0.38.1 published to the PowerShell Gallery.

Copy link
Contributor

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

1 participant