Skip to content

chore: Remove redundant rust-cache #16

chore: Remove redundant rust-cache

chore: Remove redundant rust-cache #16

Workflow file for this run

name: Pull Request Labeler
on:
pull_request:
types: [ opened ]
jobs:
labeler:
permissions:
pull-requests: write
runs-on: ubuntu-latest
name: Add labels
steps:
- name: Add bug label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.pull_request.title, 'fix:') }}
with:
labels: bug
- name: Add chore label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.pull_request.title, 'chore:') }}
with:
labels: chore
- name: Add documentation label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.pull_request.title, 'doc:') }}
with:
labels: documentation
- name: Add enhancement label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.pull_request.title, 'feat:') }}
with:
labels: enhancement
- name: Add example label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.pull_request.title, 'ex:') }}
with:
labels: example
- name: Add revert label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.pull_request.title, 'revert:') }}
with:
labels: revert
- name: Add test label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.pull_request.title, 'test:') }}
with:
labels: test
- name: Add dependency label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.pull_request.title, 'dep:') }}
with:
labels: dependency
- name: Add action label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.pull_request.title, 'act:') }}
with:
labels: action
- name: Checkout repository
uses: actions/checkout@v4
- name: Check if no label was added
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
if [ -z "$labels" ]; then
echo "No labels were added, closing the pull request."
gh pr close ${{ github.event.pull_request.number }} --comment "Closing PR: No valid prefix found in the title."
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}