Просмотр исходного кода

Merge pull request #2677 from weseek/imprv/list-unhealthy-branches

Imprv/list unhealthy branches
Yuki Takei 5 лет назад
Родитель
Сommit
1bf6842704
1 измененных файлов с 18 добавлено и 8 удалено
  1. 18 8
      .github/workflows/list-unhealthy-branches.yml

+ 18 - 8
.github/workflows/list-unhealthy-branches.yml

@@ -30,18 +30,28 @@ jobs:
 
 
     - name: Slack Notification for illegal named branches
     - name: Slack Notification for illegal named branches
       if: steps.list-branches.outputs.SLACK_ATTACHMENTS_LENGTH_ILLEGAL > 0
       if: steps.list-branches.outputs.SLACK_ATTACHMENTS_LENGTH_ILLEGAL > 0
-      uses: tokorom/action-slack-incoming-webhook@master
+      uses: sonots/slack-notice-action@v3
       env:
       env:
-        INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FOR_DEV }}
+        SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
       with:
       with:
-        text: There is some *illegal named branches* on GitHub.
-        attachments: ${{ steps.list-branches.outputs.SLACK_ATTACHMENTS_ILLEGAL }}
+        status: custom
+        payload: |
+          {
+            text: '<!channel> There is some *illegal named branches* on GitHub.',
+            channel: '#ci',
+            attachments: ${{ steps.list-branches.outputs.SLACK_ATTACHMENTS_ILLEGAL }}
+          }
 
 
     - name: Slack Notification for inactive branches
     - name: Slack Notification for inactive branches
       if: steps.list-branches.outputs.SLACK_ATTACHMENTS_LENGTH_INACTIVE > 0
       if: steps.list-branches.outputs.SLACK_ATTACHMENTS_LENGTH_INACTIVE > 0
-      uses: tokorom/action-slack-incoming-webhook@master
+      uses: sonots/slack-notice-action@v3
       env:
       env:
-        INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FOR_DEV }}
+        SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
       with:
       with:
-        text: There is some *inactive branches* on GitHub.
-        attachments: ${{ steps.list-branches.outputs.SLACK_ATTACHMENTS_INACTIVE }}
+        status: custom
+        payload: |
+          {
+            text: '<!channel> There is some *illegal named branches* on GitHub.',
+            channel: '#ci',
+            attachments: ${{ steps.list-branches.outputs.SLACK_ATTACHMENTS_INACTIVE }}
+          }