Skip to content

Add Get-GitHubGitReference and a -Ref tab completer #642

Description

Context: Many functions in this module accept a -Ref/-ref parameter (branch, tag, or SHA) but there is no way to discover valid values or tab-complete them. The Git category (src/functions/public/Git) currently only has Get-GitHubGitConfig and Set-GitHubGitConfig.

Request: Add a Get-GitHubGitReference function wrapping the GitHub REST API get/list reference endpoints:

Then use it to back a Register-ArgumentCompleter for the -Ref parameter (following the existing pattern in src/functions/public/Workflows/completers.ps1 and src/functions/public/Teams/completers.ps1), so branches/tags can be tab-completed on commands like Start-GitHubWorkflow.

Acceptance criteria:

  • Get-GitHubGitReference returns matching refs (branches/tags) for an owner/repository, following existing function conventions in the Git category
  • A completers.ps1 is added under src/functions/public/Git (or the relevant categories) registering an ArgumentCompleter for -Ref parameters across applicable functions
  • Tab-completing -Ref on a function like Start-GitHubWorkflow suggests branch/tag names
  • Follows existing module conventions for pipeline support, output typing, and tests

Related:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions