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

try using git to get commit message and concat it all together

narodnik 5 лет назад
Родитель
Сommit
0937957b2d
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      .github/workflows/matrix-commit-message.yml

+ 4 - 1
.github/workflows/matrix-commit-message.yml

@@ -6,9 +6,12 @@ jobs:
     name: Send message via Matrix
     steps:
       - run: |
+          ALL_MSGS=""
           for i in ${{ join(github.event.commits.*.id, ' ') }}; do
-            echo "::set-output name=COMMIT_MESSAGE::$i"
+            MSG=$(git --no-pager show -s --format='%h %an: %s' $i)
+            ALL_MSGS="$ALL_MSGS\n$MSG"
           done
+          echo "::set-output name=COMMIT_MESSAGE::$ALL_MSGS"
         id: commit-message
       - uses: narodnik/matrix-action@main
         with: