Repository navigation
ci(deps): bump virtualenv from 21.2.0 to 21.7.13 #2629
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Label Pull Request" | ||
|
Check warning on line 1 in .github/workflows/label_pr.yml
|
||
| on: | ||
| - pull_request_target | ||
| jobs: | ||
| label-pr: | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| sparse-checkout: | | ||
| .github/labeler.yml | ||
| sparse-checkout-cone-mode: false | ||
| - uses: actions/labeler@v7 | ||
| with: | ||
| configuration-path: .github/labeler.yml | ||
| - name: Label based on PR title | ||
| uses: actions/github-script@v9 | ||
| with: | ||
| script: | | ||
| const title = context.payload.pull_request.title.toLowerCase(); | ||
| const labels = []; | ||
| if (title.includes("fix") || title.includes("bug")) { | ||
| labels.push("type: bug"); | ||
| } | ||
| if (title.includes("feat")) { | ||
| labels.push("type: feature"); | ||
| } | ||
| if (title.includes("doc")) { | ||
| labels.push("type: documentation"); | ||
| } | ||
| if (title.includes("refactor")) { | ||
| labels.push("type: refactor"); | ||
| } | ||
| if (labels.length > 0) { | ||
| await github.rest.issues.addLabels({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.payload.pull_request.number, | ||
| labels | ||
| }); | ||
| } | ||