Skip to content

Conversation

@MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Mar 20, 2025

Description

This pull request includes several changes aimed at improving the functionality and user experience of GitHub context management and authentication scripts, but most importantly changing the way tests are structured.

Context Management

  • Renamed Set-GitHubDefaultContext to Switch-GitHubContext and added an alias for backward compatibility. [1] [2]

User Feedback Enhancements

  • Added colored feedback messages for GitHub Actions environment in Connect-GitHubAccount.ps1, Connect-GitHubApp.ps1, and Disconnect-GitHubAccount.ps1. [1] [2] [3]
  • Enabled ANSI output rendering for GitHub Actions environment in loader.ps1.

Authentication and Configuration

  • Updated Set-GitHubGitConfig.ps1 to support additional authentication types (IAT, PAT, UAT).
  • Simplified organization retrieval by removing redundant owner checks in Get-GitHubOrganization.ps1. [1] [2]

Testing Improvements

  • Added suppression for PSAvoidUsingWriteHost in Apps.Tests.ps1 and refactored test structure for better organization and clarity.

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 Mar 20, 2025
@Copilot Copilot AI review requested due to automatic review settings March 20, 2025 14:40
@MariusStorhaug MariusStorhaug requested a review from a team as a code owner March 20, 2025 14:40
Copy link
Contributor

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.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (5)
  • tests/Auth.Tests.ps1: Language not supported
  • tests/Auth2.Tests.ps1: Language not supported
  • tests/AuthCases.ps1: Language not supported
  • tests/Emojis.Tests.ps1: Language not supported
  • tests/Environments.Tests.ps1: Language not supported

@MariusStorhaug MariusStorhaug changed the title 🚀 [Feature]: Refactor tests structure with reusable cases for each auth type 🧪 [Tests]: Refactor tests structure with reusable cases for each auth type Mar 20, 2025
…check for IAT and ensuring Git configuration is set for all non-APP contexts
…from Format-Table to Format-List for improved readability
…ty and ensure repository retrieval checks for non-empty results
…epository, and Remove-GitHubRepository functions to indicate readiness for future tests
…zations.Tests for GitHub organization functionalities
@MariusStorhaug MariusStorhaug moved this from Todo to In Progress in GitHub PowerShell Module Mar 22, 2025
@MariusStorhaug MariusStorhaug requested a review from Copilot March 22, 2025 13:50
Copy link
Contributor

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.

Copilot reviewed 3 out of 23 changed files in this pull request and generated no comments.

Files not reviewed (20)
  • src/functions/private/Auth/Context/Set-GitHubContext.ps1: Language not supported
  • src/functions/public/Auth/Connect-GitHubAccount.ps1: Language not supported
  • src/functions/public/Auth/Connect-GitHubApp.ps1: Language not supported
  • src/functions/public/Auth/Context/Switch-GitHubContext.ps1: Language not supported
  • src/functions/public/Auth/Disconnect-GitHubAccount.ps1: Language not supported
  • src/functions/public/Git/Set-GitHubGitConfig.ps1: Language not supported
  • src/functions/public/Organization/Get-GitHubOrganization.ps1: Language not supported
  • src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1: Language not supported
  • src/functions/public/Repositories/Repositories/New-GitHubRepository.ps1: Language not supported
  • src/functions/public/Repositories/Repositories/Remove-GitHubRepository.ps1: Language not supported
  • src/loader.ps1: Language not supported
  • tests/Apps.Tests.ps1: Language not supported
  • tests/Auth.Tests.ps1: Language not supported
  • tests/Data/AuthCases.ps1: Language not supported
  • tests/Emojis.Tests.ps1: Language not supported
  • tests/Environments.Tests.ps1: Language not supported
  • tests/GitHub.Tests.ps1: Language not supported
  • tests/Organization.Tests.ps1: Language not supported
  • tests/Organizations.Tests.ps1: Language not supported
  • tests/Repositories.Tests.ps1: Language not supported

@MariusStorhaug MariusStorhaug merged commit ac85f0b into main Mar 22, 2025
10 checks passed
@MariusStorhaug MariusStorhaug deleted the cleanupTests branch March 22, 2025 13:50
@github-project-automation github-project-automation bot moved this from In Progress to Done in GitHub PowerShell Module Mar 22, 2025
@github-actions
Copy link
Contributor

Module GitHub - 0.18.2 published to the PowerShell Gallery.

@github-actions
Copy link
Contributor

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