From e6c7f3eb873c4620031bf96dc5b50c52b9e55813 Mon Sep 17 00:00:00 2001 From: Julius Busecke Date: Fri, 31 Mar 2023 18:08:54 -0400 Subject: [PATCH 1/3] Add optional argument to customize preview comment Thank you so much for these super useful actions. This PR adds an optional input argument for the preview comment action to enable more customized reuse of the action (outside of the ProjPythia specific context). This should be backwards compatible as far as I can tell. --- .github/workflows/preview-comment.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview-comment.yaml b/.github/workflows/preview-comment.yaml index 591c644..9a98d3c 100644 --- a/.github/workflows/preview-comment.yaml +++ b/.github/workflows/preview-comment.yaml @@ -11,6 +11,10 @@ on: description: 'SHA of the commit associated with this Pull Request' required: true type: string + site_name: + description: 'Name of the website in comment' + required: false + default: "The Cookbook" jobs: comment: @@ -26,7 +30,7 @@ jobs: - name: Set message value run: | - echo "comment_message=👋 Thanks for opening this PR! The Cookbook will be automatically built with [GitHub Actions](https://github.com/features/actions). To see the status of your deployment, click below." >> $GITHUB_ENV + echo "comment_message=👋 Thanks for opening this PR! {{ inputs.site_name }} will be automatically built with [GitHub Actions](https://github.com/features/actions). To see the status of your deployment, click below." >> $GITHUB_ENV - name: Find preview comment uses: peter-evans/find-comment@v2 From 227feb0f235991cdcc2cead88926468969a9d92a Mon Sep 17 00:00:00 2001 From: Julius Busecke Date: Fri, 31 Mar 2023 20:00:03 -0400 Subject: [PATCH 2/3] Fix syntax error --- .github/workflows/preview-comment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview-comment.yaml b/.github/workflows/preview-comment.yaml index 9a98d3c..a667c41 100644 --- a/.github/workflows/preview-comment.yaml +++ b/.github/workflows/preview-comment.yaml @@ -30,7 +30,7 @@ jobs: - name: Set message value run: | - echo "comment_message=👋 Thanks for opening this PR! {{ inputs.site_name }} will be automatically built with [GitHub Actions](https://github.com/features/actions). To see the status of your deployment, click below." >> $GITHUB_ENV + echo "comment_message=👋 Thanks for opening this PR! ${{ inputs.site_name }} will be automatically built with [GitHub Actions](https://github.com/features/actions). To see the status of your deployment, click below." >> $GITHUB_ENV - name: Find preview comment uses: peter-evans/find-comment@v2 From 5e71c37cf846ae512d5ab3172d9d4f33f89bdba9 Mon Sep 17 00:00:00 2001 From: Julius Busecke Date: Mon, 3 Apr 2023 09:56:37 -0400 Subject: [PATCH 3/3] Update preview-comment.yaml --- .github/workflows/preview-comment.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/preview-comment.yaml b/.github/workflows/preview-comment.yaml index a667c41..aa9682a 100644 --- a/.github/workflows/preview-comment.yaml +++ b/.github/workflows/preview-comment.yaml @@ -15,6 +15,7 @@ on: description: 'Name of the website in comment' required: false default: "The Cookbook" + type: string jobs: comment: