From 64c165feb48adc2aacc8f5a19c0bf08b046410a5 Mon Sep 17 00:00:00 2001 From: freddydk Date: Mon, 7 Aug 2023 12:12:13 +0200 Subject: [PATCH] remove redundant parameters --- .github/workflows/Deploy.yaml | 2 +- Internal/Deploy.ps1 | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Deploy.yaml b/.github/workflows/Deploy.yaml index 1ce0adcee..e655c7754 100644 --- a/.github/workflows/Deploy.yaml +++ b/.github/workflows/Deploy.yaml @@ -58,7 +58,7 @@ jobs: "copyToMain" = ($env:copyToMain -eq 'Y') "defaultBcContainerHelperVersion" = $env:defaultBcContainerHelperVersion } - . ".\Internal\Deploy.ps1" -config $config -githubOwner $githubOwner -token $token + . ".\Internal\Deploy.ps1" -config $config -token $token } } catch { diff --git a/Internal/Deploy.ps1 b/Internal/Deploy.ps1 index b5377b1d5..0ef1c0027 100644 --- a/Internal/Deploy.ps1 +++ b/Internal/Deploy.ps1 @@ -2,11 +2,7 @@ [Parameter(Mandatory=$true)] [Hashtable] $config, [Parameter(Mandatory=$true)] - [string] $githubOwner, - [Parameter(Mandatory=$true)] - [string] $token, - [string] $algoBranch, - [switch] $directCommit + [string] $token ) Import-Module (Join-Path $PSScriptRoot "..\Actions\Github-Helper.psm1" -Resolve) -DisableNameChecking @@ -17,8 +13,8 @@ $oldPath = Get-Location try { # Authenticate to GIT and GH - invoke-git config --global user.email "$githubOwner@users.noreply.github.com" - invoke-git config --global user.name "$githubOwner" + invoke-git config --global user.email "$($config.githubOwner)@users.noreply.github.com" + invoke-git config --global user.name "$($config.githubOwner)" invoke-git config --global hub.protocol https invoke-git config --global core.autocrlf false $ENV:GITHUB_TOKEN = ''