Skip to content

Conversation

MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Sep 9, 2025

Description

This pull request focuses on improving the usability and consistency of the GitHub context management PowerShell module. The main changes include renaming parameter sets and internal logic for clarity, ensuring output is sorted for better user experience, and updating the context completer for more accurate and user-friendly suggestions.

Parameter set and logic improvements:

  • Renamed parameter sets in Get-GitHubContext.ps1 for clarity (e.g., 'NamedContext' to 'Get a named context', 'ListAvailableContexts' to 'List all available contexts') and updated corresponding internal logic and debug messages for consistency.

Output and completion enhancements:

  • Sorted the output of contexts by name in Get-GitHubContext.ps1 to provide a more organized and predictable result.
  • Moved completers.ps1 from the private to public directory, and updated the context completer to suppress debug output, sort and deduplicate context names, and improve the accuracy of completion suggestions.

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 9, 2025
@Copilot Copilot AI review requested due to automatic review settings September 9, 2025 21:38
@MariusStorhaug MariusStorhaug requested a review from a team as a code owner September 9, 2025 21:38
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 pull request improves the usability and consistency of the GitHub context management PowerShell module by sorting outputs, renaming parameter sets for clarity, and enhancing the context completer functionality.

  • Renamed parameter sets from technical names to descriptive ones for better clarity
  • Added sorting to context outputs to provide consistent, alphabetical ordering
  • Enhanced the context completer to suppress debug output and deduplicate results

Reviewed Changes

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

File Description
src/functions/public/Auth/Context/completers.ps1 Enhanced context completer to suppress debug output and sort/deduplicate context names
src/functions/public/Auth/Context/Get-GitHubContext.ps1 Renamed parameter sets for clarity and added sorting to context output

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

@MariusStorhaug MariusStorhaug merged commit 8ef51f0 into main Sep 10, 2025
133 of 145 checks passed
@MariusStorhaug MariusStorhaug deleted the sortedContext branch September 10, 2025 07:59
Copy link
Contributor

Module GitHub - 0.36.12 published to the PowerShell Gallery.

Copy link
Contributor

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

Sort Get-GitHubContext -ListAvailable output and unify sorted Context argument completers
1 participant