Skip to content

Add Sha and Pipeline support to New-GitHubRepositoryBranch #261

Closed
@HowardWolosky

Description

@HowardWolosky

Feature Idea Summary

Follow-up from PR feedback:

This should have an optional parameter for Sha. If not supplied, I agree, the function can continue to look up the existing Sha value. However, in the event that a user pipes in a GitHub.Branch object, it should have everything that it needs.

  1. New-GitHubRepositoryBranch should be able to completely take in a GitHub.Branch object as its pipeline input. It should therefore have [Parameter(ValueFromPipelineByPropertyName)] added to $BranchName.
  2. Add-GitHubBranchAdditionalProperties should add Sha as a top-level property that it adds to a GitHub.Branch object.
  3. New-GitHubRepositoryBranch should have an optional Sha property that can receive ValueFromPipelineByPropertyName, and only resorts to looking up the Sha via an additional REST request if it wasn't supplied.

Feature Idea Additional Details

Requested Assignment

- I'm just suggesting this idea, but don't want to implement it.

Operating System

Name               : Microsoft Windows 10 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2004
WindowsBuildLabEx    : 19041.1001.amd64fre.vb_release_ingestion.191208-1700
OsLanguage           : en-US
OsMuiLanguages       : {en-US, es-MX}

PowerShell Version

Name                           Value
----                           -----
PSVersion                      5.1.19041.1001
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1001
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module Version

Running: 0.14.0
Installed:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn issue or pull request introducing new functionality to the project.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