Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add pr-comment workflow #3

Merged
merged 12 commits into from
Jan 13, 2024
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. 🎉'
})