From d3769ab978bd224ba05d8dd4119f08d7e308d015 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 23 Jun 2021 14:36:29 -0500 Subject: [PATCH] Use flags to help ensure things are passed --- .../dependencies/run-dotnet-whatsnew.sh | 16 +++++++++++++--- .github/workflows/whats-new.yml | 5 +---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dependencies/run-dotnet-whatsnew.sh b/.github/workflows/dependencies/run-dotnet-whatsnew.sh index bbc40a6ac83c8..b8fd0d48d8ebd 100755 --- a/.github/workflows/dependencies/run-dotnet-whatsnew.sh +++ b/.github/workflows/dependencies/run-dotnet-whatsnew.sh @@ -12,9 +12,19 @@ declare -r ENDDATE=$(date "+%F" -d "$STARTDATE +1 month -1 day"); echo "From $STARTDATE to $ENDDATE" +while getopts o:r:s: option +do +case "${option}" +in +o) OWNER=${OPTARG};; +r) REPO=${OPTARG};; +s) SAVEDIR=${OPTARG};; +esac +done + dotnet whatsnew \ - --owner $1 \ - --repo $2 \ + --owner $OWNER \ + --repo $REPO \ --startdate $STARTDATE \ --enddate $ENDDATE \ - --savedir $3 + --savedir $SAVEDIR diff --git a/.github/workflows/whats-new.yml b/.github/workflows/whats-new.yml index dfd4d6f831eb0..416e5ce23b25f 100644 --- a/.github/workflows/whats-new.yml +++ b/.github/workflows/whats-new.yml @@ -55,10 +55,7 @@ jobs: env: GitHubKey: ${{ secrets.GITHUB_TOKEN }} run: | - ./.github/workflows/dependencies/run-dotnet-whatsnew.sh \ - 'dotnet' \ # owner - 'docs' \ # repo - '/docs/whats-new' # savedir + ./.github/workflows/dependencies/run-dotnet-whatsnew.sh -o dotnet -r docs -s '/docs/whats-new' # Create the PR for the new article - name: create-pull-request