name: Contributing Guidelines

on:
  issues:
    types: [opened]
  pull_request:
    types: [opened]

jobs:
  comment:
    runs-on: ubuntu-latest
    permissions:
      issues: write
      pull-requests: write

    steps:
    - name: Comment on issues
      if: github.event_name == 'issues'
      run: |
        gh issue comment ${{ github.event.issue.number }} --body '
        🎉 **Thank you for opening an issue!** 

        Before we proceed, please:
        - 📖 Read our [Contributing Guidelines](https://github.com/chetanupare/WP-Native-Content-Relationships/blob/main/CONTRIBUTING.md)
        - 🔍 Check if this issue is already reported
        - 📝 Provide as much detail as possible

        For first-time contributors, look for issues with the "good first issue" label!
        '
      env:
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    - name: Comment on pull requests
      if: github.event_name == 'pull_request'
      run: |
        gh pr comment ${{ github.event.pull_request.number }} --body '
        🎉 **Thank you for contributing!** 

        Please ensure:
        - 📖 You have read our [Contributing Guidelines](https://github.com/chetanupare/WP-Native-Content-Relationships/blob/main/CONTRIBUTING.md)
        - ✅ Your code follows WordPress standards
        - 🧪 Tests are passing
        - 📝 Documentation is updated if needed

        We will review your PR as soon as possible!
        '
      env:
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
