-
Notifications
You must be signed in to change notification settings - Fork 22
31 lines (27 loc) · 976 Bytes
/
pr-merge-comment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Comment on Merged PR
on:
pull_request:
types: [closed]
jobs:
comment-on-pr:
if: >
github.event.pull_request.merged == true &&
github.event.pull_request.user.login != 'dependabot[bot]' &&
github.event.pull_request.user.login != github.repository_owner
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Comment on the PR
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const commentBody = `Hi @${context.payload.sender.login},\n\nThis task has been completed and will be implemented in the next project release.\n\nThank you for your contribution!`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: commentBody
});