Skip to content

Commit

Permalink
update in auto label pr
Browse files Browse the repository at this point in the history
  • Loading branch information
Anjaliavv51 committed Jul 31, 2024
1 parent e117005 commit d7dd562
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/auto-label-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,4 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['gssoc']
})
- name: Add additional labels based on title
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const title = context.payload.pull_request.title.toLowerCase();
const labelsToAdd = [];
if (title.includes('documentation')) {
labelsToAdd.push('documentation');
}
if (title.includes('feature')) {
labelsToAdd.push('feature');
}
if (title.includes('bug')) {
labelsToAdd.push('bug');
}
if (labelsToAdd.length > 0) {
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: labelsToAdd
});
}
})

0 comments on commit d7dd562

Please sign in to comment.