name: Auto message for PR's and Issues
on: [pull_request, issues]

jobs:
  send-message:
    runs-on: ubuntu-latest
    if: github.event.pull_request.merged
    steps:
      - uses: actions/github-script@v6
        name: send-message
        with:
          github-token: ${{ secrets.GLOBAL_GHA_PAT }}
          script: |
            await github.rest.issues.createComment({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: `Hey, thank you for opening your Pull Request ! 🙂 We will get to this as soon as we can!`
            })

