From cf0fd2bfebdb472362cf46a8f2b682276092bcf0 Mon Sep 17 00:00:00 2001 From: Rakshith R Date: Fri, 26 May 2023 15:40:47 +0530 Subject: [PATCH] ci: fix pull-request-commentor workflow Fix if condition in workflow to account for ok-to-test label on newly created prs. Signed-off-by: Rakshith R --- .github/workflows/pull-request-commentor.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-commentor.yaml b/.github/workflows/pull-request-commentor.yaml index 39e5c333c..da90ce2ad 100644 --- a/.github/workflows/pull-request-commentor.yaml +++ b/.github/workflows/pull-request-commentor.yaml @@ -12,7 +12,10 @@ on: jobs: add-comment: # yamllint disable-line rule:line-length - if: github.event.label.name == 'ok-to-test' && github.event.pull_request.merged != 'true' + 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