From 4321de607cd969d51e2e0e7bd57aeb0b78fd1b2c Mon Sep 17 00:00:00 2001 From: anunay-xin Date: Thu, 19 Mar 2026 12:00:15 +0530 Subject: [PATCH] ci(workflow): handle all cases of wip (#2162) * ci(workflow): handle WIP all cases * ci(workflow): refine WIP title checks for PR notifications * ci(workflow): change PR trigger to pull_request_target to enable notifications from fork PRs --- .github/workflows/pr-notify-slack.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-notify-slack.yml b/.github/workflows/pr-notify-slack.yml index 2db1593609..435327d44c 100644 --- a/.github/workflows/pr-notify-slack.yml +++ b/.github/workflows/pr-notify-slack.yml @@ -1,9 +1,9 @@ -# Notify Slack when a PR is ready for review (not draft, title does not contain WIP). +# Notify Slack when a PR is ready for review (not draft, title does not contain WIP/wip/Wip.). # Triggers: new PR (non-draft, no WIP), draft -> ready, or title edited to remove WIP. name: PR notify Slack on: - pull_request: + pull_request_target: types: [opened, reopened, ready_for_review, edited] workflow_dispatch: @@ -28,15 +28,16 @@ jobs: notify: runs-on: ubuntu-latest if: | - github.event_name == 'pull_request' && github.event.pull_request.draft == false && - !contains(github.event.pull_request.title, 'WIP') && + !startsWith(github.event.pull_request.title, 'wip') && + !startsWith(github.event.pull_request.title, '[wip]') && ( github.event.action != 'edited' || ( github.event.changes.title && ( - contains(github.event.changes.title.from, 'WIP') + startsWith(github.event.changes.title.from, 'wip') || + startsWith(github.event.changes.title.from, '[wip]') ) ) )