From 40888f01b66245b3b15042b62903ae742cae494a Mon Sep 17 00:00:00 2001 From: Rakshith R Date: Wed, 14 Jun 2023 15:24:45 +0530 Subject: [PATCH] ci: fix pr-commentor for merge queue draft pr The mergify label copier used github-actions bot to add labels. Actions performed by github-actions bot do not trigger a workflow and hence pull-request-commentor was not working as expected. This commit modifies mergify label copier to use Cephcsi-bot to copy labels which then will be able to trigger action to add pr comments. Signed-off-by: Rakshith R --- .github/workflows/mergify-copy-labels.yaml | 1 + .github/workflows/pull-request-commentor.yaml | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mergify-copy-labels.yaml b/.github/workflows/mergify-copy-labels.yaml index e47422fc3..3323b438c 100644 --- a/.github/workflows/mergify-copy-labels.yaml +++ b/.github/workflows/mergify-copy-labels.yaml @@ -15,3 +15,4 @@ jobs: uses: Mergifyio/gha-mergify-merge-queue-labels-copier@main with: additional-labels: 'ok-to-test' + token: ${{ secrets.CEPH_CSI_BOT_TOKEN }} diff --git a/.github/workflows/pull-request-commentor.yaml b/.github/workflows/pull-request-commentor.yaml index 2e87772db..8d90d3a53 100644 --- a/.github/workflows/pull-request-commentor.yaml +++ b/.github/workflows/pull-request-commentor.yaml @@ -8,14 +8,11 @@ on: - "release-v*" types: - labeled - - opened jobs: add-comment: if: > (github.event.label.name == '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')) + github.event.pull_request.merged != true) runs-on: ubuntu-latest permissions: pull-requests: write