chris-peterson / pwsh-gitlab

:computer: PowerShell module for GitLab
MIT License
22 stars 10 forks source link

Piping project to New-GitlabPipelineSchedule not working #67

Closed CaseyMacPherson closed 1 year ago

CaseyMacPherson commented 1 year ago

The implementation of New-GitlabPipelineSchedule ignores piped Project object.

The function does have the value from pipeline attribute. It just seems like an oversight based on the implementation.

function New-GitlabPipelineSchedule {
    param (
        [Parameter(Mandatory=$false, ValueFromPipelineByPropertyName=$true)]
        [string]
        $ProjectId = '.',

# Other stuff removed

   $Project = Get-GitlabProject -SiteUrl $SiteUrl
    if ($Ref -eq '.') {
        $Ref = $(Get-LocalGitContext).Branch
    }

Fix inbound