From ac04004e01f5d3d6ad4e03583d2b219691bd77d0 Mon Sep 17 00:00:00 2001 From: Anjaliavv51 <154777864+Anjaliavv51@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:20:32 +0530 Subject: [PATCH] delete autp label for PR. #1 --- .github/workflows/add-gssoc-label-pr.yml | 46 ------------------------ 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/add-gssoc-label-pr.yml diff --git a/.github/workflows/add-gssoc-label-pr.yml b/.github/workflows/add-gssoc-label-pr.yml deleted file mode 100644 index 5f829487..00000000 --- a/.github/workflows/add-gssoc-label-pr.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Auto Label PR - -on: - pull_request: - types: [opened, reopened, synchronize] - -jobs: - label_pr: - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - name: Label PR - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const pr = context.payload.pull_request; - const prBody = pr.body ? pr.body.toLowerCase() : ''; - const prTitle = pr.title.toLowerCase(); - - const addLabel = async (label) => { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - labels: [label] - }); - }; - - if (prBody.includes('documentation') || prTitle.includes('doc') || prBody.includes('readme')) { - await addLabel('documentation'); - } - - if (prBody.includes('feature') || prBody.includes('enhancement') || prTitle.includes('add') || prTitle.includes('implement')) { - await addLabel('enhancement'); - } - - if (prBody.includes('bug') || prBody.includes('fix') || prTitle.includes('fix') || prTitle.includes('resolve')) { - await addLabel('bug'); - } - - if (prBody.includes('GSSOCEXTD')) { - await addLabel('GSSOCEXTD'); - await addLabel('hacktoberfest-accepted') - }