add all labels
This commit is contained in:
parent
e3b39819c6
commit
d489357da0
@ -21,22 +21,21 @@ jobs:
|
|||||||
- name: Label issues
|
- name: Label issues
|
||||||
run: |
|
run: |
|
||||||
ISSUE_TITLE=$(gh issue view ${{ github.event.number }} --json title -q ".title")
|
ISSUE_TITLE=$(gh issue view ${{ github.event.number }} --json title -q ".title")
|
||||||
if [[ $ISSUE_TITLE == chore:* ]]; then
|
case "$ISSUE_TITLE" in
|
||||||
gh issue edit ${{ github.event.number }} --add-label "type: chore"
|
chore:*) LABEL="type: chore" ;;
|
||||||
elif [[ $ISSUE_TITLE == feat:* ]]; then
|
feat:*) LABEL="type: feature request" ;;
|
||||||
gh issue edit ${{ github.event.number }} --add-label "type: feat"
|
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
|
fi
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
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',
|
|
||||||
# };
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user