diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 5c6e9604..30827ecf 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -1,16 +1,27 @@ name: Greetings -on: [pull_request_target, issues] +on: + issues: + types: [opened] + pull_request_target: + types: [opened] jobs: greeting: runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: "Hello @${{ github.actor }}, 👋 Thank you for creating your first issue in our repository. We appreciate your contribution!" - pr-message: "Hello @${{ github.actor }}, 👋 Thank you for creating your first pull request in our repository. We appreciate your contribution!" + - name: Send greeting for issues + if: github.event_name == 'issues' + run: | + curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \ + -d '{"body": "Hello @${{ github.actor }}, 👋 Thank you for creating an issue in our repository. We appreciate your contribution!"}' + - name: Send greeting for pull requests + if: github.event_name == 'pull_request_target' + run: | + curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \ + -d '{"body": "Hello @${{ github.actor }}, 👋 Thank you for creating a pull request in our repository. We appreciate your contribution!"}' + diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 51e3242a..9f0994aa 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -1,5 +1,5 @@ name: Labeler -on: [pull_request_target] +on: [pull_request_target, issues] jobs: label: