Skip to content

Commit 8dc0bc4

Browse files
committed
chore: add debug flag
1 parent 11f83b5 commit 8dc0bc4

5 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/actions/activity/dist/new-issues/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/activity/dist/popular-issues/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/activity/src/new-issues.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function run() {
4242

4343
await slackClient.chat.postMessage({
4444
text: generateText(data.items),
45-
channel: '#dev-feed',
45+
channel: process.env.DEBUG === 'true' ? '#test-slack-notifications' : '#dev-feed',
4646
icon_emoji: ':github:',
4747
username: 'GitHub Notifier',
4848
})

.github/actions/activity/src/popular-issues.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export async function run() {
5050

5151
await slackClient.chat.postMessage({
5252
text: messageText,
53-
channel: '#dev-feed',
53+
channel: process.env.DEBUG === 'true' ? '#test-slack-notifications' : '#dev-feed',
5454
icon_emoji: ':github:',
5555
username: 'GitHub Notifier',
5656
})

.github/workflows/activity-notifications.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Notify about repo activity
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
debug:
7+
description: Enable debug logging
8+
required: false
9+
default: false
510

611
jobs:
712
run:
@@ -21,3 +26,4 @@ jobs:
2126
env:
2227
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2328
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
29+
DEBUG: ${{ github.event.inputs.debug || 'false' }}

0 commit comments

Comments
 (0)