From a09464aec0f85bc50e50929c25e0f048e188d969 Mon Sep 17 00:00:00 2001 From: Durgesh kumar prajapati <98798977+Durgesh4993@users.noreply.github.com> Date: Sun, 26 May 2024 09:43:52 +0530 Subject: [PATCH] Add files via upload --- .github/workflows/AutoGreeting.yml | 25 +++++++++++++++++++++++++ .github/workflows/auto-label-issues.yml | 22 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/workflows/AutoGreeting.yml create mode 100644 .github/workflows/auto-label-issues.yml diff --git a/.github/workflows/AutoGreeting.yml b/.github/workflows/AutoGreeting.yml new file mode 100644 index 0000000..0de889f --- /dev/null +++ b/.github/workflows/AutoGreeting.yml @@ -0,0 +1,25 @@ +name: Auto Greeting + +on: + issues: + types: [opened] + +permissions: + issues: write + +jobs: + greet: + runs-on: ubuntu-latest + steps: + - name: Add a greeting comment + uses: actions/github-script@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const issueComment = `Hey @${context.payload.issue.user.login}! πŸ‘‹ \n\n πŸ‘‰ Thanks for opening this issue. We appreciate your contribution and will look into it as soon as possible. \n πŸ‘‰ Don’t forget to star our [Community Page](https://github.com/GameSphere-MultiPlayer/Community-Page) and Follow Us on GitHub \n πŸ‘‰ Make sure you join our [Discord](https://discord.gg/rZb46cCMmK), we have created separate channels for all projects`; + await github.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: issueComment + }); diff --git a/.github/workflows/auto-label-issues.yml b/.github/workflows/auto-label-issues.yml new file mode 100644 index 0000000..65dbc27 --- /dev/null +++ b/.github/workflows/auto-label-issues.yml @@ -0,0 +1,22 @@ +name: Auto-label on Any Issue + +on: + issues: + types: [opened] + +jobs: + auto-label: + runs-on: ubuntu-latest + steps: + - name: Add labels to any new issue + uses: actions/github-script@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const labelsToAdd = ["gssoc"]; + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: labelsToAdd + });