From 3f407f2368379576fc23d21b926e33f246063163 Mon Sep 17 00:00:00 2001 From: Piyush Gupta Date: Wed, 5 Jun 2024 18:29:11 +0530 Subject: [PATCH] Update pr-merge.yml --- .github/workflows/pr-merge.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-merge.yml b/.github/workflows/pr-merge.yml index f3cc56b..8f8801f 100644 --- a/.github/workflows/pr-merge.yml +++ b/.github/workflows/pr-merge.yml @@ -19,6 +19,11 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const { owner, repo } = context.repo; - const number = context.issue.number; + const number = context.payload.pull_request.number; const 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! 🚀"; - github.issues.createComment({ owner, repo, issue_number: number, body }); + await github.rest.issues.createComment({ + owner: owner, + repo: repo, + issue_number: number, + body: body + });