From 0cdc8610dbcaab7bc3881361b626e3f5aaa10896 Mon Sep 17 00:00:00 2001 From: Filipe PINTO Date: Tue, 6 Jun 2023 13:13:44 +0200 Subject: [PATCH] Fix advisory GHSA-vf82-g995-949v --- .github/workflows/accept-pull-request.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/accept-pull-request.yml b/.github/workflows/accept-pull-request.yml index dcc0ee9b4..8356f65b6 100644 --- a/.github/workflows/accept-pull-request.yml +++ b/.github/workflows/accept-pull-request.yml @@ -17,6 +17,7 @@ jobs: REPO: ${{ github.event.repository.name }} PR_NUMBER: ${{ github.event.issue.number }} COMMENT_USER_LOGIN: ${{ github.event.comment.user.login }} + PR_COMMENT: ${{ github.event.comment.body }} outputs: base_ref: ${{ steps.init-all-internal-env-vars.outputs.base_ref }} new_version_master_snapshot_version: ${{ steps.check-github-release.outputs.new_version_master_snapshot_version }} @@ -72,7 +73,7 @@ jobs: - name: Notify user run: | - if [[ "${{ github.event.comment.body }}" =~ "--force" ]] ; then + if [[ "${{ env.PR_COMMENT }}" =~ "--force" ]] ; then order="/accept --force" else order="/accept" @@ -191,7 +192,7 @@ jobs: comment="🔨 Auto rebase from \`${{ env.BASE_REPO_FULL_NAME}}/${{ env.BASE_REF }}\` succeeds, \`${{ env.HEAD_REPO_FULL_NAME}}/${{ env.HEAD_REF }}\` now embeds these commits:
$(echo ; sed "s/+/-/g" ${{ env.REMAINING_COMMITS_FILE }})" echo " - ${comment}" gh pr comment "${PR_NUMBER}" --body "${comment}" - if [[ "${{ github.event.comment.body }}" =~ "--force" ]] ; then + if [[ "${{ env.PR_COMMENT }}" =~ "--force" ]] ; then order="/accept --force" else order="/accept" @@ -274,7 +275,7 @@ jobs: - name: Close pull request run: | - if [[ "${{ github.event.comment.body }}" =~ "--force" ]] ; then + if [[ "${{ env.PR_COMMENT }}" =~ "--force" ]] ; then comment="✅ Pull request merged without waiting for checks and closed by \`${COMMENT_USER_LOGIN}\` with fast forward merge." else comment="✅ Pull request merged and closed by \`${COMMENT_USER_LOGIN}\` with fast forward merge."