diff --git a/action.yml b/action.yml index fef8978..aa62451 100644 --- a/action.yml +++ b/action.yml @@ -22,12 +22,12 @@ runs: export LC_ALL=en_US.utf8 git log $(git describe --abbrev=0 2> /dev/null || git rev-list --max-parents=0 HEAD)..HEAD | \ grep -oE "${{ inputs.jira-project-key }}-[[:digit:]]{1,}" | sort | uniq | \ - sed 's/^\|$/"/g' | paste -sd , | awk '{print "RELATED_JIRA_ISSUES="$0}' >> $GITHUB_ENV + sed 's/^\|$/"/g' | paste -sd , - | awk '{print "RELATED_JIRA_ISSUES="$0}' >> $GITHUB_ENV shell: bash - name: Create json and invoke webhook run: | - $json = ConvertTo-Json @{issues = @(${{ env.RELATED_JIRA_ISSUES }}); data = @{version = "${{ inputs.build-version }}"; projectName = "${{ inputs.jira-project-key }}"}} + $json = ConvertTo-Json @{issues = @("${{ env.RELATED_JIRA_ISSUES }}"); data = @{version = "${{ inputs.build-version }}"; projectName = "${{ inputs.jira-project-key }}"}} [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-RestMethod ${{ inputs.jira-automation-webhook }} -Method Post -Body $json -ContentType "application/json" shell: pwsh