Skip to content

Commit

Permalink
Merge pull request #128 from suhanipaliwal/suhanipaliwal-patch-3
Browse files Browse the repository at this point in the history
Added the feature of auto commenting when a PR is merged
  • Loading branch information
Akshatchaube01 committed Jun 20, 2024
2 parents 900f778 + 9b04f5d commit a29337e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/auto-comment-on-pr-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Auto Comment on PR Merge

on:
pull_request:
types: [closed]

jobs:
comment:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Add Comment to Merged PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -H "Authorization: token $GITHUB_TOKEN" \
-X POST \
-d '{"body":"🎉 Your pull request has been successfully merged! 🎉 Thank you for your contribution to our project. Your efforts are greatly appreciated. Keep up the fantastic work! 🚀"}' \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"

0 comments on commit a29337e

Please sign in to comment.