diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..a2ee049 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,20 @@ +name: Greetings + +on: + pull_request_target: + issues: + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - name: Greet the user + uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "👋 Thank you @${{ github.actor }} for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!" + pr-message: "🎉 Thank you @${{ github.actor }} for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making this project better." + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 549436e..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Greetings - -on: - issues: - types: [opened] - pull_request: - types: [opened] - -jobs: - greet: - runs-on: ubuntu-latest - steps: - - name: Greet the user - uses: actions/github-script@v6 - with: - script: | - const issue = context.issue; - const message = "Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible."; - await github.issues.createComment({ - ...issue, - body: message - });