Skip to content

Commit

Permalink
Merge pull request #3 from frontChapter/add-pr-comment-workflow
Browse files Browse the repository at this point in the history
ci: add pr-comment workflow
  • Loading branch information
AmirHosseinKarimi committed Jan 13, 2024
2 parents 0ff1abe + 25ff068 commit 23d7ec4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pull request comment after merge
on:
pull_request:
types:
- closed

jobs:
comment:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
env:
USERNAME: ${{ github.event.pull_request.user.login }}
USER_URL: ${{ github.event.pull_request.user.html_url }}
steps:
- name: "Comment on the PR"
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Thank you [@${{ env.USERNAME }}](${{ env.USER_URL }}) ❤️\nYour changes has been merged to the `dev` branch. 🎉'
})

0 comments on commit 23d7ec4

Please sign in to comment.