diff --git a/.github/workflows/autolabel.yml b/.github/workflows/autolabel.yml new file mode 100644 index 0000000..bedd310 --- /dev/null +++ b/.github/workflows/autolabel.yml @@ -0,0 +1,34 @@ +name: Auto Label Issue +on: + issues: + types: [opened, reopened, edited] +jobs: + label_issue: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Label Issue + uses: actions/github-script@v6 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const issue = context.payload.issue; + const issueBody = issue.body ? issue.body.toLowerCase() : ''; + const issueTitle = issue.title.toLowerCase(); + + // Add gssoc label to all issues + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: ['gssoc-ext','hacktoberfest-accepted'] + }); + const addLabel = async (label) => { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: [label] + }); + }; diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..c65dc9a --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,14 @@ +name: Greetings +on: [pull_request_target, issues] +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: "👋 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"