From ba7288b72b4a02772de4ab9ef4eff5f41df48aa1 Mon Sep 17 00:00:00 2001 From: Samyak Aditya <91079592+samyak-aditya@users.noreply.github.com> Date: Wed, 2 Oct 2024 19:58:44 +0530 Subject: [PATCH 1/2] Create main.yml --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..549436e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,22 @@ +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 + }); From 5a78fc52d4241dc30f7616efb39faa0560e2fc67 Mon Sep 17 00:00:00 2001 From: Samyak Aditya <91079592+samyak-aditya@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:30:19 +0530 Subject: [PATCH 2/2] Update and rename main.yml to greetings.yml --- .github/workflows/greetings.yml | 20 ++++++++++++++++++++ .github/workflows/main.yml | 22 ---------------------- 2 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/greetings.yml delete mode 100644 .github/workflows/main.yml 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 - });