File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,13 +80,23 @@ jobs:
8080 fi
8181
8282 elif [[ "$EVENT_NAME" == "pull_request" ]]; then
83- PR_ACTION="${{ github.event.action }}"
84- PR_TITLE_RAW="${{ github.event.pull_request.title }}"
85- PR_URL="${{ github.event.pull_request.html_url }}"
86- PR_TITLE=$(escape_markdown "$PR_TITLE_RAW")
87- REPLY='{"inline_keyboard": [[{"text": "View PR", "url": "'"$PR_URL"'"}]]}'
88- send_message "🔃 *Pull Request $PR_ACTION* by [$ACTOR](https://github.com/$ACTOR):\n• *$PR_TITLE*" "$REPLY"
89-
83+ PR_ACTION="${{ github.event.action }}"
84+ PR_TITLE_RAW="${{ github.event.pull_request.title }}"
85+ PR_URL="${{ github.event.pull_request.html_url }}"
86+ PR_TITLE=$(escape_markdown "$PR_TITLE_RAW")
87+ PR_MERGED="${{ github.event.pull_request.merged }}"
88+ REPLY='{"inline_keyboard": [[{"text": "View PR", "url": "'"$PR_URL"'"}]]}'
89+ if [[ "$PR_ACTION" == "closed" ]]; then
90+ if [[ "$PR_MERGED" == "true" ]]; then
91+ STATUS="*Merged*"
92+ else
93+ STATUS="*Closed without merge*"
94+ fi
95+ send_message "🔃 *Pull Request closed* by [$ACTOR](https://github.com/$ACTOR)\n• $STATUS\n• *$PR_TITLE*" "$REPLY"
96+ else
97+ send_message "🔃 *Pull Request $PR_ACTION* by [$ACTOR](https://github.com/$ACTOR):\n• *$PR_TITLE*" "$REPLY"
98+ fi
99+
90100 elif [[ "$EVENT_NAME" == "release" ]]; then
91101 REL_NAME_RAW="${{ github.event.release.name }}"
92102 REL_URL="${{ github.event.release.html_url }}"
You can’t perform that action at this time.
0 commit comments