mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-16 16:48:11 +08:00
31 lines
831 B
YAML
31 lines
831 B
YAML
name: label_issue
|
|
|
|
on:
|
|
issues:
|
|
types:
|
|
- opened
|
|
|
|
jobs:
|
|
label_issue:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
ISSUE_URL: ${{ github.event.issue.html_url }}
|
|
ISSUE_TITLE: "${{ github.event.issue.title }}"
|
|
run: |
|
|
gh issue edit $ISSUE_URL --add-label "pending"
|
|
|
|
# auto-add label for npu
|
|
NPU_KEYWORDS=("npu" "ascend" "昇腾")
|
|
LABEL_NPU="npu"
|
|
ISSUE_TITLE_LOWER=$(echo "$ISSUE_TITLE" | tr '[:upper:]' '[:lower:]')
|
|
|
|
for keyword in "${NPU_KEYWORDS[@]}"; do
|
|
if [[ "$ISSUE_TITLE_LOWER" == *"$keyword"* ]] && [[ "$ISSUE_TITLE_LOWER" != *"input"* ]]; then
|
|
gh issue edit "$ISSUE_URL" --add-label "$LABEL_NPU"
|
|
break
|
|
fi
|
|
done
|