Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d7a9df6

Browse filesBrowse files
RafaelGSStargos
authored andcommitted
build: notify via slack when review-wanted
I have noticed we don't have a usual workflow for review-wanted PRs. So, in other words the label is not useful as it should be. This commit notify via Slack (#node-core) whenever this label is placed either on an issue or in a PR. PR-URL: #55102 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
1 parent 706e961 commit d7a9df6
Copy full SHA for d7a9df6

File tree

Expand file treeCollapse file tree

1 file changed

+40
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+40
-0
lines changed
Open diff view settings
Collapse file
+40Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Notify on Review Wanted
2+
on:
3+
issues:
4+
types: [labeled]
5+
pull_request_target:
6+
types: [labeled]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
notifyOnReviewWanted:
13+
name: Notify on Review Wanted
14+
if: github.repository == 'nodejs/node' && github.event.label == 'review wanted'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Determine PR or Issue
18+
id: define-message
19+
run: |
20+
if [[ -n "${{ github.event.pull_request.number }}" ]]; then
21+
number="${{ github.event.pull_request.number }}"
22+
link="https://github.com/${{ github.repository }}/pull/$number"
23+
echo "message=The PR (#$number) requires review from Node.js maintainers. See: $link" >> "$GITHUB_OUTPUT"
24+
echo "title=${{ github.actor }} asks for attention on pull request #$number" >> "$GITHUB_OUTPUT"
25+
else
26+
number="${{ github.event.issue.number }}"
27+
link="https://github.com/${{ github.repository }}/issues/$number"
28+
echo "message=The issue (#$number) requires review from Node.js maintainers. See: $link" >> "$GITHUB_OUTPUT"
29+
echo "title=${{ github.actor }} asks for attention on issue #$number" >> "$GITHUB_OUTPUT"
30+
fi
31+
32+
- name: Slack Notification
33+
uses: rtCamp/action-slack-notify@4e5fb42d249be6a45a298f3c9543b111b02f7907 # 2.3.0
34+
env:
35+
SLACK_COLOR: '#DE512A'
36+
SLACK_ICON: https://github.com/nodejs.png?size=48
37+
SLACK_TITLE: ${{ steps.define-message.outputs.title }}
38+
SLACK_MESSAGE: ${{ steps.define-message.outputs.message }}
39+
SLACK_USERNAME: nodejs-bot
40+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.