Quellcode durchsuchen

finishing github/irc-commit-message

ghassmo vor 4 Jahren
Ursprung
Commit
95f4de0a7d
1 geänderte Dateien mit 17 neuen und 20 gelöschten Zeilen
  1. 17 20
      .github/workflows/irc-commit-message.yml

+ 17 - 20
.github/workflows/irc-commit-message.yml

@@ -1,26 +1,23 @@
-on: [push]
+name: "Push Notification IRC"
+on: [push, pull_request]
 
 jobs:
-  send-message:
+  test:
     runs-on: ubuntu-latest
-    name: Send message via IRC 
     steps:
-      - name: checkout
-        uses: actions/checkout@v2
+      - name: irc push
+        uses: rectalogic/notify-irc@v1
+        if: github.event_name == 'push'
         with:
-          fetch-depth: 0
-      - run: |
-          ALL_MSGS=""
-          for i in ${{ join(github.event.commits.*.id, ' ') }}; do
-            MSG=$(git --no-pager show -s --format='%h <b>%an</b>: %s' $i)
-            ALL_MSGS="$ALL_MSGS$MSG<br>"
-          done
-          echo "::set-output name=COMMIT_MESSAGE::$ALL_MSGS"
-        id: commit-message
-      - uses: Gottox/irc-message-action@v2 
+          channel: "#dev"
+          server: "irc1.dark.fi"
+          nickname: github-notifier
+          message: ${{ github.actor }} pushed ${{ join(github.event.commits.*.message) }} ${{ github.event.ref }}
+      - name: irc pull request
+        uses: rectalogic/notify-irc@v1
+        if: github.event_name == 'pull_request'
         with:
-          server: 'irc1.dark.fi'
-          channel: '#dev'
-          nickname: b1-66er
-          message: '${{ steps.commit-message.outputs.COMMIT_MESSAGE }}'
-
+          channel: "#dev"
+          server: "irc1.dark.fi"
+          nickname: github-notifier
+          message: ${{ github.actor }} opened PR ${{ github.event.pull_request.html_url }}