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 eca2df0

Browse filesBrowse files
mmarchinidanielleadams
authored andcommitted
meta: notify slack when someone force pushes
Notify #nodejs-dev on the OpenJS Foundation slack when someone force-pushes, removing one manual step from force-pushing. PR-URL: #35131 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 4e0995b commit eca2df0
Copy full SHA for eca2df0

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+25
-0
lines changed
Open diff view settings
Collapse file
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
name: Notify on Force Push
7+
jobs:
8+
slackNotification:
9+
name: Slack Notification
10+
if: ${{ github.event.forced && github.repository == 'nodejs/node' }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Slack Notification
14+
uses: rtCamp/action-slack-notify@master
15+
env:
16+
SLACK_COLOR: '#DE512A'
17+
SLACK_ICON: https://github.com/nodejs.png?size=48
18+
SLACK_TITLE: '${{ github.actor }} force-pushed to ${{ github.ref }}'
19+
SLACK_MESSAGE: |
20+
A commit was force-pushed to <https://github.com/${{ github.repository }}/tree/master|${{ github.repository }}@master> by <https://github.com/${{ github.actor }}|${{ github.actor }}>
21+
22+
Before: <https://github.com/${{ github.repository }}/commit/${{ github.event.before }}|${{ github.event.before }}>
23+
After: <https://github.com/${{ github.repository }}/commit/${{ github.event.after }}|${{ github.event.after }}>
24+
SLACK_USERNAME: nodejs-bot
25+
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.