Refactor member creation flow and add unit tests #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Notify Slack on PR Merge | |
| on: | |
| pull_request: | |
| types: [closed] | |
| jobs: | |
| notify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get GitHub User Name | |
| id: get_username | |
| run: | | |
| USERNAME=$(curl -s "https://api.github.com/users/${{ github.actor }}" | jq -r '.name') | |
| if [ "$USERNAME" == "null" ]; then | |
| USERNAME="${{ github.actor }}" | |
| fi | |
| echo "USERNAME=$USERNAME" >> $GITHUB_ENV | |
| - name: Send Slack Notification | |
| if: github.event.pull_request.merged == true | |
| uses: rtCamp/action-slack-notify@v2 | |
| env: | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| SLACK_MESSAGE: | | |
| ✅ *PR Merged!* | |
| 🚀 *${{ github.event.pull_request.title }}* | |
| 🛠 Merged by: `${{ env.USERNAME }}` | |
| 📝 Description: | |
| - ${{ github.event.pull_request.body }} | |
| 🔗 *PR URL:* ${{ github.event.pull_request.html_url }} | |
| SLACK_USERNAME: "GitHub Actions" | |
| SLACK_ICON_EMOJI: ":white_check_mark:" |