LLaMA-Factory/.github/workflows/label_issue.yml

28 lines
735 B
YAML
Raw Normal View History

2024-06-08 13:11:32 +00:00
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 }}
2024-06-24 13:59:39 +00:00
ISSUE_TITLE: ${{ github.event.issue.title }}
2024-06-08 13:11:32 +00:00
run: |
2024-06-24 13:59:39 +00:00
LABEL=pending
NPU_KEYWORDS=(npu ascend 昇腾)
ISSUE_TITLE_LOWER=$(echo $ISSUE_TITLE | tr '[:upper:]' '[:lower:]')
for KEYWORD in ${NPU_KEYWORDS[@]}; do
2024-06-24 14:01:23 +00:00
if [[ $ISSUE_TITLE_LOWER == *$KEYWORD* ]] && [[ $ISSUE_TITLE_LOWER != *input* ]]; then
2024-06-24 13:59:39 +00:00
LABEL=pending,npu
2024-06-24 12:27:00 +00:00
break
fi
done
2024-06-24 13:59:39 +00:00
gh issue edit $ISSUE_URL --add-label $LABEL