Skip to content

Commit 2b0287f

Browse files
author
Ufuk Cetinkaya
committed
feat: GitHub PR → Slack bildirim workflow'u eklendi
1 parent 065ae05 commit 2b0287f

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/slack-notify.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Slack Bildirimleri
2+
3+
on:
4+
pull_request:
5+
types: [opened, closed]
6+
branches: [main, develop]
7+
8+
jobs:
9+
notify:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: PR Acildi Bildirimi
13+
if: github.event.action == 'opened'
14+
run: |
15+
curl -s -X POST https://slack.com/api/chat.postMessage \
16+
-H "Authorization: Bearer ${{ secrets.SLACK_BOT_TOKEN }}" \
17+
-H "Content-Type: application/json" \
18+
-d "{
19+
\"channel\": \"${{ secrets.SLACK_DEV_CHANNEL_ID }}\",
20+
\"text\": \"🔀 *Yeni PR:* <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>\n📦 Repo: ${{ github.repository }}\n👤 ${{ github.event.pull_request.user.login }}\n🎯 ${{ github.event.pull_request.base.ref }} ← ${{ github.event.pull_request.head.ref }}\"
21+
}"
22+
23+
- name: PR Merge Bildirimi
24+
if: github.event.action == 'closed' && github.event.pull_request.merged == true
25+
run: |
26+
curl -s -X POST https://slack.com/api/chat.postMessage \
27+
-H "Authorization: Bearer ${{ secrets.SLACK_BOT_TOKEN }}" \
28+
-H "Content-Type: application/json" \
29+
-d "{
30+
\"channel\": \"${{ secrets.SLACK_DEV_CHANNEL_ID }}\",
31+
\"text\": \"✅ *PR Merge Edildi:* <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>\n📦 Repo: ${{ github.repository }}\n👤 ${{ github.event.pull_request.user.login }}\"
32+
}"

0 commit comments

Comments
 (0)