From 88b40e3063a58d7325a668741f707e973d39c8f8 Mon Sep 17 00:00:00 2001 From: Krzysztof Szyper <45788587+ChristophShyper@users.noreply.github.com> Date: Thu, 10 Nov 2022 14:12:49 +0100 Subject: [PATCH 1/2] Fix sed gobbling for a newline replacement Current version of `sed` on `ubuntu:jammy-20221101` stopped working as before. As a result newlines weren't showing properly in PR body. Output was polluted by `^NowALiNiA^` strings, which should be newlines. --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 66ae8bd..cdd919f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -129,7 +129,7 @@ if [[ "${INPUT_GET_DIFF}" == "true" ]]; then TEMPLATE=$(echo -e "${TEMPLATE}" | sed ':a;N;$!ba; s##\n'"${GIT_DIFF}"'\n#g') TEMPLATE=$(echo -e "${TEMPLATE}" | sed ':a;N;$!ba; s#.*#\n'"${GIT_DIFF}"'\n#g') fi -TEMPLATE=$(echo -e "${TEMPLATE}" | sed 's|\^HaSz\^|#|g' | sed ':a;N;$!ba; s|\^NowALiNiA\^|\n|g') +TEMPLATE=$(echo -e "${TEMPLATE}" | sed 's|\^HaSz\^|#|g' | sed '1h;2,$H;$!d;g; s|\^NowALiNiA\^|\n|g') if [[ -z "${PR_NUMBER}" ]]; then echo -e "\nSetting all arguments..." From 5121a0945d8c07c0d730c2151304ade831c89e0d Mon Sep 17 00:00:00 2001 From: Krzysztof Szyper <45788587+ChristophShyper@users.noreply.github.com> Date: Thu, 10 Nov 2022 14:15:43 +0100 Subject: [PATCH 2/2] Bump release to `v0.5.3` --- Makefile | 2 +- README.md | 6 +++--- action.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 46475e8..5f9caa5 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ phony: help # Release tag for the action -VERSION := v0.5.2 +VERSION := v0.5.3 # GitHub Actions bogus variables GITHUB_REF ?= refs/heads/null diff --git a/README.md b/README.md index 4138ce9..89c1975 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Features: ```yaml - name: Run the Action - uses: devops-infra/action-pull-request@v0.5.2 + uses: devops-infra/action-pull-request@v0.5.3 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_branch: development @@ -119,7 +119,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - name: Create pull request - uses: devops-infra/action-pull-request@v0.5.2 + uses: devops-infra/action-pull-request@v0.5.3 with: github_token: ${{ secrets.GITHUB_TOKEN }} title: Automatic pull request @@ -141,7 +141,7 @@ jobs: fetch-depth: 0 - name: Run the Action if: startsWith(github.ref, 'refs/heads/feature') - uses: devops-infra/action-pull-request@v0.5.2 + uses: devops-infra/action-pull-request@v0.5.3 with: github_token: ${{ secrets.GITHUB_TOKEN }} title: ${{ github.event.commits[0].message }} diff --git a/action.yml b/action.yml index 558a106..1417a69 100644 --- a/action.yml +++ b/action.yml @@ -69,7 +69,7 @@ outputs: description: Pull request URL. runs: using: docker - image: docker://devopsinfra/action-pull-request:v0.5.2 + image: docker://devopsinfra/action-pull-request:v0.5.3 env: GITHUB_TOKEN: ${{ inputs.github_token }} branding: