From ee5ac1d05eb904756e1932f5b54028b7a8e16271 Mon Sep 17 00:00:00 2001 From: Renn F Date: Mon, 12 Oct 2026 17:00:15 +0200 Subject: [PATCH] chore(ci): relay development activity to the family Discord channel --- .github/workflows/discord-dev-feed.yml | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/discord-dev-feed.yml diff --git a/.github/workflows/discord-dev-feed.yml b/.github/workflows/discord-dev-feed.yml new file mode 100644 index 00000000..1bf872d9 --- /dev/null +++ b/.github/workflows/discord-dev-feed.yml @@ -0,0 +1,40 @@ +name: Discord dev feed + +on: + issues: + types: [opened, closed, reopened] + issue_comment: + types: [created] + pull_request_target: + types: [opened, closed, reopened] + pull_request_review: + types: [submitted] + pull_request_review_comment: + types: [created] + discussion: + types: [created] + discussion_comment: + types: [created] + +permissions: {} + +jobs: + relay: + if: >- + github.event.sender.type != 'Bot' && + (github.event.pull_request.user.type || github.event.issue.user.type || 'User') != 'Bot' + runs-on: ubuntu-latest + steps: + - name: Forward the event to the family channel + env: + WEBHOOK: ${{ secrets.DISCORD_DEV_FEED_WEBHOOK }} + EVENT: ${{ github.event_name == 'pull_request_target' && 'pull_request' || github.event_name }} + run: | + if [ -z "$WEBHOOK" ]; then + echo "::notice::DISCORD_DEV_FEED_WEBHOOK is not available to this run (fork pull request or unset secret); skipping" + exit 0 + fi + curl -fsS -X POST "$WEBHOOK/github" \ + -H "Content-Type: application/json" \ + -H "X-GitHub-Event: $EVENT" \ + --data-binary "@$GITHUB_EVENT_PATH"