diff --git a/eng/common/pipelines/templates/steps/create-pull-request.yml b/eng/common/pipelines/templates/steps/create-pull-request.yml index 3c0d6481198..f3b32ae89cc 100644 --- a/eng/common/pipelines/templates/steps/create-pull-request.yml +++ b/eng/common/pipelines/templates/steps/create-pull-request.yml @@ -86,4 +86,4 @@ steps: -UserReviewers "${{ parameters.GHReviewersVariable }}" -TeamReviewers "${{ parameters.GHTeamReviewersVariable }}" -Assignees "${{ parameters.GHAssignessVariable }}" - -CloseAfterOpenForTesting $${{ parameters.CloseAfterOpenForTesting }} + -CloseAfterOpenForTesting $${{ coalesce(parameters.CloseAfterOpenForTesting, 'false') }} diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index e1aec2bfb1f..2b57bcf7f41 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -18,6 +18,7 @@ parameters: GHReviewersVariable: '' GHTeamReviewersVariable: '' # externally set, as eng-common does not have the identity-resolver. Run as pre-step OnboardingBranch: '' + CloseAfterOpenForTesting: false steps: - pwsh: | @@ -83,7 +84,7 @@ steps: GHReviewersVariable: ${{ parameters.GHReviewersVariable }} GHTeamReviewersVariable: ${{ parameters.GHTeamReviewersVariable }} PRLabels: ${{ parameters.PRLabels }} - CloseAfterOpenForTesting: $(TestPipeline) + CloseAfterOpenForTesting: ${{ parameters.CloseAfterOpenForTesting }} - ${{if ne( parameters['OnboardingBranch'], '')}}: - pwsh: | @@ -124,4 +125,4 @@ steps: ScriptDirectory: ${{ parameters.WorkingDirectory }}/${{ parameters.ScriptDirectory }} GHReviewersVariable: ${{ parameters.GHReviewersVariable }} GHTeamReviewersVariable: ${{ parameters.GHTeamReviewersVariable }} - CloseAfterOpenForTesting: $(TestPipeline) + CloseAfterOpenForTesting: ${{ parameters.CloseAfterOpenForTesting }} diff --git a/eng/common/scripts/Invoke-GitHubAPI.ps1 b/eng/common/scripts/Invoke-GitHubAPI.ps1 index 8fc752fb1f4..b4a3d897153 100644 --- a/eng/common/scripts/Invoke-GitHubAPI.ps1 +++ b/eng/common/scripts/Invoke-GitHubAPI.ps1 @@ -35,7 +35,7 @@ function Invoke-GitHubAPIPost { else { $warning = "{0} with Uri [ $apiURI ] did not fire request because of empty body." -f (Get-PSCallStack)[1].FunctionName LogWarning $warning - exit 0 + return $null } } catch { @@ -69,7 +69,7 @@ function Invoke-GitHubAPIPatch { else { $warning = "{0} with Uri [ $apiURI ] did not fire request because of empty body." -f (Get-PSCallStack)[1].FunctionName LogWarning $warning - exit 0 + return $null } } catch {