From b804181a3d72845928627bd9d183335390e60770 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 30 May 2023 16:24:16 +0200 Subject: [PATCH] ci: remove `\` from GitHub Workflow if condition Backslashes (`\`) cause issues in the `if` statment with GitHub Workflows. Unexpected symbol: '\'. Located at position 53 within expression: (github.event.pull_request.label == 'ok-to-test' && \ Using the `>` YAML syntax to replace linebreaks with spaces should address this problem. Signed-off-by: Niels de Vos --- .github/workflows/pull-request-commentor.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request-commentor.yaml b/.github/workflows/pull-request-commentor.yaml index 377a555d9..85aed5dad 100644 --- a/.github/workflows/pull-request-commentor.yaml +++ b/.github/workflows/pull-request-commentor.yaml @@ -11,10 +11,11 @@ on: - opened jobs: add-comment: - if: (github.event.pull_request.label == 'ok-to-test' && \ - github.event.pull_request.merged != 'true') || \ - (github.event.pull_request.action == 'opened' && \ - contains(github.event.pull_request.labels.*.name,'ok-to-test')) + if: > + (github.event.pull_request.label == 'ok-to-test' && + github.event.pull_request.merged != 'true') || + (github.event.pull_request.action == 'opened' && + contains(github.event.pull_request.labels.*.name,'ok-to-test')) runs-on: ubuntu-latest permissions: pull-requests: write