]> git.mdlowis.com Git - proto/labwc.git/commitdiff
CI: add discussion category to IRC notification
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Wed, 6 Nov 2024 13:35:47 +0000 (14:35 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Wed, 6 Nov 2024 13:36:58 +0000 (14:36 +0100)
.github/workflows/irc.yml

index 22643b9c5efe2482b8356b1989f5fca581440810..66cfbfdbf207d00fb611bf8799b59339752895f3 100644 (file)
@@ -6,7 +6,7 @@ on:
   issues:
     types: [opened, closed, reopened]
   discussion:
-    types: [created]
+    types: [created, closed, deleted]
   push:
     branches:
       - 'master_disabled'
@@ -60,7 +60,25 @@ jobs:
           channel: "#labwc"
           nickname: "labwc"
           notice: true
-          message: "${{ github.actor }} opened discussion '${{ github.event.discussion.title }}' (${{ github.event.discussion.html_url }})"
+          message: "${{ github.actor }} opened discussion '${{ github.event.discussion.title }}' in [${{ github.event.discussion.category.name }}] (${{ github.event.discussion.html_url }})"
+      - name: discussion closed
+        uses: rectalogic/notify-irc@v1
+        if: github.event_name == 'discussion' && github.event.action == 'closed'
+        with:
+          server: "irc.libera.chat"
+          channel: "#labwc"
+          nickname: "labwc"
+          notice: true
+          message: "${{ github.actor }} closed discussion '${{ github.event.discussion.title }}' in [${{ github.event.discussion.category.name }}] (${{ github.event.discussion.html_url }})"
+      - name: discussion deleted
+        uses: rectalogic/notify-irc@v1
+        if: github.event_name == 'discussion' && github.event.action == 'deleted'
+        with:
+          server: "irc.libera.chat"
+          channel: "#labwc"
+          nickname: "labwc"
+          notice: true
+          message: "${{ github.actor }} deleted discussion '${{ github.event.discussion.title }}' in [${{ github.event.discussion.category.name }}] (${{ github.event.discussion.html_url }})"
       - name: irc pull request opened
         uses: rectalogic/notify-irc@v1
         if: github.event_name == 'pull_request' && github.event.action == 'opened'