Skip to content

Commit

Permalink
add all labels
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSage committed Dec 1, 2023
1 parent e3b3981 commit d489357
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/auto-label-conventional-commits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,21 @@ jobs:
- name: Label issues
run: |
ISSUE_TITLE=$(gh issue view ${{ github.event.number }} --json title -q ".title")
if [[ $ISSUE_TITLE == chore:* ]]; then
gh issue edit ${{ github.event.number }} --add-label "type: chore"
elif [[ $ISSUE_TITLE == feat:* ]]; then
gh issue edit ${{ github.event.number }} --add-label "type: feat"
case "$ISSUE_TITLE" in
chore:*) LABEL="type: chore" ;;
feat:*) LABEL="type: feature request" ;;
perf:*) LABEL="type: enhancement" ;;
fix:*) LABEL="type: bug" ;;
docs:*) LABEL="type: documentation" ;;
ci:*) LABEL="type: ci" ;;
build:*) LABEL="type: ci" ;;
test:*) LABEL="type: chore" ;;
style:*) LABEL="type: chore" ;;
refactor:*) LABEL="type: chore" ;;
*) LABEL="" ;;
esac
if [ -n "$LABEL" ]; then
gh issue edit ${{ github.event.number }} --add-label "$LABEL"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# const labelMapping = {
# 'feat:': 'type: feature request',
# 'perf:': 'type: enhancement',
# 'fix:': 'type: bug',
# 'docs:': 'type: documentation',
# 'ci:': 'type: ci',
# 'build:': 'type: ci',
# 'chore:': 'type: chore',
# 'test:': 'type: chore',
# 'style:': 'type: chore',
# 'refactor:': 'type: chore',
# };

0 comments on commit d489357

Please sign in to comment.