diff --git a/.github/workflows/notification.yaml b/.github/workflows/notification.yaml new file mode 100644 index 0000000..4ca082c --- /dev/null +++ b/.github/workflows/notification.yaml @@ -0,0 +1,28 @@ +name: Send Notification to Chatwork + +on: + pull_request: + types: [opened] + +jobs: + notify: + runs-on: ubuntu-latest + + steps: + - name: Send notification to Chatwork + env: + CHATWORK_API_TOKEN: ${{ secrets.CHATWORK_API_TOKEN_GITHUB }} + CHATWORK_ROOM_ID: ${{ secrets.CHATWORK_ROOM_ID }} + run: | + PR_TITLE=$(jq -r '.pull_request.title' $GITHUB_EVENT_PATH) + PR_URL=$(jq -r '.pull_request.html_url' $GITHUB_EVENT_PATH) + PR_USER=$(jq -r '.pull_request.user.login' $GITHUB_EVENT_PATH) + BODY=`cat <