From 38850363209de897532c91b114b1b90c4e2c6d91 Mon Sep 17 00:00:00 2001 From: SoumyosishPal Date: Wed, 20 Aug 2025 00:44:23 +0530 Subject: [PATCH 1/2] issue create automate message added --- .../issue-create-automate-message.yml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/issue-create-automate-message.yml diff --git a/.github/workflows/issue-create-automate-message.yml b/.github/workflows/issue-create-automate-message.yml new file mode 100644 index 0000000..961e64d --- /dev/null +++ b/.github/workflows/issue-create-automate-message.yml @@ -0,0 +1,28 @@ +name: Auto Comment on Issue + +on: + issues: + types: [opened] + +permissions: + issues: write + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - name: Add Comment to Issue + uses: actions/github-script@v6 + with: + script: | + const issueNumber = context.issue.number; + const commentBody = `### Thank you for raising this issue!\n We'll review it as soon as possible. We truly appreciate your contributions! ✨\n\n> Meanwhile make sure you've visited the README.md, CONTRIBUTING.md, and CODE_OF_CONDUCT.md before creating a PR for this. Also, please do NOT create a PR until this issue has been assigned to you. 😊`; + + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issueNumber, + body: commentBody + }); + + console.log('Comment added successfully.'); \ No newline at end of file From 752af3f31effc10ed1469c5ddd64d3d971ac5af2 Mon Sep 17 00:00:00 2001 From: SoumyosishPal Date: Fri, 22 Aug 2025 19:03:54 +0530 Subject: [PATCH 2/2] pr create automate message added --- .../workflows/pr-create-automate-message.yml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/pr-create-automate-message.yml diff --git a/.github/workflows/pr-create-automate-message.yml b/.github/workflows/pr-create-automate-message.yml new file mode 100644 index 0000000..8c90343 --- /dev/null +++ b/.github/workflows/pr-create-automate-message.yml @@ -0,0 +1,30 @@ +name: Auto Comment on PR + +on: + pull_request_target: + types: [opened] + +permissions: + issues: write + pull-requests: write + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - name: Comment on PR + uses: actions/github-script@v6 + with: + script: | + const prNumber = context.issue.number; + + const commentBody = `### Thanks for creating a PR for your Issue! ☺️\n\nWe'll review it as soon as possible.\nIn the meantime, please double-check the **file changes** and ensure that **all commits** are accurate.\n\nIf there are any **unresolved review comments**, feel free to resolve them. πŸ™ŒπŸΌ`; + + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: prNumber, + body: commentBody + }); + + console.log('Comment added successfully.'); \ No newline at end of file