Update label_issue.yml
This commit is contained in:
parent
90c74ff251
commit
aa60cd8910
|
@ -13,18 +13,15 @@ jobs:
|
||||||
- env:
|
- env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
ISSUE_URL: ${{ github.event.issue.html_url }}
|
ISSUE_URL: ${{ github.event.issue.html_url }}
|
||||||
ISSUE_TITLE: "${{ github.event.issue.title }}"
|
ISSUE_TITLE: ${{ github.event.issue.title }}
|
||||||
run: |
|
run: |
|
||||||
gh issue edit $ISSUE_URL --add-label "pending"
|
LABEL=pending
|
||||||
|
NPU_KEYWORDS=(npu ascend 昇腾)
|
||||||
# auto-add label for npu
|
ISSUE_TITLE_LOWER=$(echo $ISSUE_TITLE | tr '[:upper:]' '[:lower:]')
|
||||||
NPU_KEYWORDS=("npu" "ascend" "昇腾")
|
for KEYWORD in ${NPU_KEYWORDS[@]}; do
|
||||||
LABEL_NPU="npu"
|
if [[ $ISSUE_TITLE_LOWER == *$KEYWORD* ]] && [[ $ISSUE_TITLE_LOWER != *input* ]] then
|
||||||
ISSUE_TITLE_LOWER=$(echo "$ISSUE_TITLE" | tr '[:upper:]' '[:lower:]')
|
LABEL=pending,npu
|
||||||
|
|
||||||
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
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
gh issue edit $ISSUE_URL --add-label $LABEL
|
||||||
|
|
Loading…
Reference in New Issue