Skip to content

Get-GitHubRepositoryBranch: All Branches are Returned When Name Parameter is Specified #187

Closed

Description

Issue Details

When calling the Get-GitHubRepositoryBranch function and passing the Name parameter to receive details of one particular branch, details for all branches in the repository are returned.

Code to reproduce the issue

$branches = Get-GitHubRepositoryBranch -OwnerName Microsoft `
    -RepositoryName PowerShellForGitHub -Name Master
$branches.name

Expected Output

master

Actual Output

master
testingDocs

Suggested Solution

Remove the "`?" from the end of $uriFragment on line 92 of GitHubBranches.ps1.

Operating System

OsName               : Microsoft Windows Server 2019 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

PowerShell Version

PSVersion                      7.0.1
PSEdition                      Core
GitCommitId                    7.0.1
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module Version

ModuleType Version    PreRelease Name
---------- -------    ---------- ----             
Script     0.13.1                PowerShellForGitHub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugThis relates to a bug in the existing module.in progressWork on this issue is already underway. Please don't work start new work on it.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions