Skip to content

Added Game Development Analysis (Hacktoberfest '23) #4

Added Game Development Analysis (Hacktoberfest '23)

Added Game Development Analysis (Hacktoberfest '23) #4

Workflow file for this run

name: PR Closure
on:
pull_request:
types:
- closed
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check if PR is merged
id: check_merged
run: echo "::set-output name=is_merged::$(if [ \"${{ github.event.pull_request.merged }}\" == "true" ]; then echo "true"; else echo "false"; fi)"
- name: Comment on PR
uses: actions/github-script@v4
with:
github-token: ${{ secrets.DEMO_TOKEN }}
script: |
if [ "${{ steps.check_merged.outputs.is_merged }}" == "true" ]; then
comment_body='Thank you, @${{ github.actor }}! Your pull request has been merged.'
else
comment_body='Thanks, @${{ github.actor }}! Unfortunately, your pull request was closed without being merged. If you have any questions or need further assistance, feel free to ask.'
fi
github.issues.createComment({
issue_number: github.event.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})