Skip to content

Commit 0d99860

Browse files
Alex Wangyaythomas
authored andcommitted
chore: do not send notification for draft PR
1 parent d184502 commit 0d99860

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/notify_slack.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
issues:
55
types: [opened, reopened]
66
pull_request_target:
7-
types: [opened, reopened]
7+
types: [opened, reopened, ready_for_review]
88

99
permissions: {}
1010

@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- name: Send issue notification to Slack
1616
if: github.event_name == 'issues'
17-
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
17+
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
1818
with:
1919
webhook: ${{ secrets.SLACK_WEBHOOK_URL_ISSUE }}
2020
webhook-type: incoming-webhook
@@ -26,8 +26,8 @@ jobs:
2626
}
2727
2828
- name: Send pull request notification to Slack
29-
if: github.event_name == 'pull_request_target'
30-
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
29+
if: github.event_name == 'pull_request_target' && github.event.pull_request.draft == false
30+
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
3131
with:
3232
webhook: ${{ secrets.SLACK_WEBHOOK_URL_PR }}
3333
webhook-type: incoming-webhook

0 commit comments

Comments
 (0)