From ea50548c40e9d7de6d3c7654bda50e3e826f1915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Fri, 2 Feb 2024 00:57:40 +0100 Subject: [PATCH] properly check for newline --- .github/workflows/try.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/try.yml b/.github/workflows/try.yml index 8ad4b1514..bcda9a625 100644 --- a/.github/workflows/try.yml +++ b/.github/workflows/try.yml @@ -5,7 +5,7 @@ on: jobs: acknowledge: runs-on: ubuntu-latest - if: github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && (contains(github.event.comment.body, '\n/ci try') || startsWith(github.event.comment.body, '/ci try')) + if: github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && (contains(toJson(github.event.comment.body), '\n/ci try') || startsWith(github.event.comment.body, '/ci try')) steps: - uses: actions/checkout@v3 - name: Acknowledge command @@ -17,7 +17,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} continue-on-error: true try: - if: github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && (contains(github.event.comment.body, '\n/ci try') || startsWith(github.event.comment.body, '/ci try')) + if: github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && (contains(toJson(github.event.comment.body), '\n/ci try') || startsWith(github.event.comment.body, '/ci try')) uses: ./.github/workflows/ci.yml with: matrix-args: try --comment "${{ github.event.comment.body }}" --pr ${{ github.event.issue.number }}