Files
AIsouler-GKD_subscription/.github/workflows/issue_content_check.yml
2025-12-14 20:40:08 +08:00

38 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: issue_content_check
on:
issues:
types: [opened]
jobs:
check-issue-content:
runs-on: ubuntu-latest
steps:
- name: Add label and close issue for missing snapshots
if: |
contains(github.event.issue.body, 'i.gkd.li/') == false &&
contains(github.event.issue.body, '.zip') == false
uses: actions-cool/issues-helper@v3
with:
actions: add-labels,create-comment,close-issue
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
labels: 'invalid'
body: |
您好 ${{ github.event.issue.user.login }}由于您没有提供快照此issue已被自动关闭。
- name: Add label and comment for inaccessible snapshot links
if: contains(github.event.issue.body, 'i.gkd.li/snapshot/') == true
uses: actions-cool/issues-helper@v3
with:
actions: add-labels,create-comment
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
labels: 'invalid'
body: |
您好 ${{ github.event.issue.user.login }},检测到您提供了他人无法访问的链接,
请点击查看 [正确的分享快照方式说明](https://gkd.li/guide/snapshot#share-note) 。
可在下方评论区补充