name: Welcome message for pull requests
on:
  pull_request:
    types:
      - opened

jobs:
  say-hi:
    continue-on-error: true
    permissions:
      pull-requests: write
    runs-on: ubuntu-latest
    steps:
      - name: Say hi
        uses: jungwinter/comment@v1
        with:
          type: create
          token: ${{ secrets.GITHUB_TOKEN }}
          issue_number: ${{ github.event.pull_request.number }}
          body: |
            Hi, ${{ github.event.pull_request.user.login }}! Welcome to ${{ github.repository }} PRs! 
            Make sure to comply with the [Code of Conduct](
            https://github.com/${{ github.repository }}/blob/main/CODE_OF_CONDUCT.md), [security policy](
            https://github.com/${{ github.repository }}/blob/main/SECURITY.md) and [contribution guidelines
            ](https://github.com/${{ github.repository }}/blob/main/CONTRIBUTING.md) before contributing to 
            this repo.
