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 <rar@redhat.com>
This commit is contained in:
Rakshith R 2023-05-26 15:40:47 +05:30 committed by mergify[bot]
parent b157b1a7c2
commit cf0fd2bfeb

View File

@ -12,7 +12,10 @@ on:
jobs: jobs:
add-comment: add-comment:
# yamllint disable-line rule:line-length # 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 runs-on: ubuntu-latest
permissions: permissions:
pull-requests: write pull-requests: write