File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : DevDocs PR or Issue Creation Notifier
2+ on :
3+ issues :
4+ types : [opened]
5+ pull_request :
6+ types : [opened]
7+
8+ jobs :
9+ notify :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Check for new PR or issues
13+ uses : actions/github-script@v7
14+ with :
15+ script : |
16+ const text = context.payload.comment?.body
17+ || context.payload.issue?.body
18+ || context.payload.pull_request?.body
19+ || context.payload.review?.body
20+ || "";
21+
22+ await fetch(process.env.SLACK_WEBHOOK_URL, {
23+ method: "POST",
24+ headers: { "Content-Type": "application/json" },
25+ body: JSON.stringify({
26+ text: `:eyes: @DevDocs a PR was opened or issue created in *${context.payload.repository.full_name}*
27+ Event: *${context.eventName}*
28+ Link: ${context.payload.comment?.html_url
29+ || context.payload.issue?.html_url
30+ || context.payload.pull_request?.html_url
31+ || context.payload.review?.html_url}`
32+ }),
33+ });
34+ env :
35+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
You can’t perform that action at this time.
0 commit comments