Skip to content

Unused auto-label .mergeable #93

Unused auto-label .mergeable

Unused auto-label .mergeable #93

Workflow file for this run

name: Auto Label Pull Requests
on:
pull_request_target:
types: [opened]
branches:
- '**'
jobs:
auto-label:
runs-on: ubuntu-latest
steps:
- name: Check out the PR branch
uses: actions/checkout@v4
- name: Add labels based on branch name
id: add-labels
run: |
branch_name="${{ github.event.pull_request.head.ref }}"
labels=""
if [[ "$branch_name" == docs/* ]]; then
labels="Documentation"
elif [[ "$branch_name" == feature/* ]]; then
labels="Feature"
elif [[ "$branch_name" == chore/* || "$branch_name" == fix/* || "$branch_name" == refactor/* ]]; then
labels="Fix"
fi
echo "labels=$labels" >> $GITHUB_ENV
- name: Apply labels
if: env.labels != ''
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ github.TOKEN }}
labels: ${{ env.labels }}