Skip to content

Commit

Permalink
ci: fix pr-commentor for merge queue draft pr
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Rakshith-R authored and mergify[bot] committed Jun 14, 2023
1 parent 848a8d8 commit 40888f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/mergify-copy-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
5 changes: 1 addition & 4 deletions .github/workflows/pull-request-commentor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40888f0

Please sign in to comment.