Merge pull request #4445 from MengqingCao/label

auto-label npu issue

Former-commit-id: e0014db7d2771a1f32f2b7a9f3e577e34390e818
This commit is contained in:
hoshi-hiyouga 2024-06-24 22:02:05 +08:00 committed by GitHub
commit f3a2dda567

View File

@ -13,5 +13,15 @@ jobs:
- 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"
LABEL=pending
NPU_KEYWORDS=(npu ascend 昇腾)
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
LABEL=pending,npu
break
fi
done
gh issue edit $ISSUE_URL --add-label $LABEL