From df1db5d25c01625ddc072d695642e5260f4683f9 Mon Sep 17 00:00:00 2001 From: cegekaJG <120664985+cegekaJG@users.noreply.github.com> Date: Fri, 19 Jul 2024 04:59:03 +0000 Subject: [PATCH] Fix placeholder syntax in PR Handler action (#1145) This PR fixes an error introduced by #1130. The new reference values use the `format()` command to generate a git reference, but the placeholder syntax was incorrect. The two instances of `${0}` per template have been replaced with `{0}`. --- RELEASENOTES.md | 1 + .../AppSource App/.github/workflows/PullRequestHandler.yaml | 4 ++-- .../.github/workflows/PullRequestHandler.yaml | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index a6942f10c..ee39aa896 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -9,6 +9,7 @@ - Issue 1109 Why filter deployment settings? - Fix issue with github ref when running reusable workflows - Issue 1098 Support for specifying the name of the AZURE_CREDENTIALS secret by adding a AZURE_CREDENTIALSSecretName setting +- Fix placeholder syntax for git ref in PullRequestHandler.yaml ### Dependencies to PowerShell modules diff --git a/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml b/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml index f7b7edabd..43d7374f1 100644 --- a/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml +++ b/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml @@ -53,7 +53,7 @@ jobs: uses: actions/checkout@v4 with: lfs: true - ref: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/${0}/merge', github.event.pull_request.number) }} + ref: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} - name: Initialize the workflow id: init @@ -93,7 +93,7 @@ jobs: with: shell: ${{ needs.Initialization.outputs.githubRunnerShell }} runsOn: ${{ needs.Initialization.outputs.githubRunner }} - checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/${0}/merge', github.event.pull_request.number) }} + checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} diff --git a/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml b/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml index f7b7edabd..43d7374f1 100644 --- a/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml +++ b/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml @@ -53,7 +53,7 @@ jobs: uses: actions/checkout@v4 with: lfs: true - ref: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/${0}/merge', github.event.pull_request.number) }} + ref: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} - name: Initialize the workflow id: init @@ -93,7 +93,7 @@ jobs: with: shell: ${{ needs.Initialization.outputs.githubRunnerShell }} runsOn: ${{ needs.Initialization.outputs.githubRunner }} - checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/${0}/merge', github.event.pull_request.number) }} + checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }}