mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
[skip ci] add a check for provider names
This commit is contained in:
parent
1c6a74269f
commit
9eda9b892c
1 changed files with 25 additions and 6 deletions
31
.github/workflows/issue-action.yml
vendored
31
.github/workflows/issue-action.yml
vendored
|
@ -22,17 +22,36 @@ jobs:
|
|||
title-excludes: ''
|
||||
comment-title: '### Your issue looks similar to these issues:.\n\nPlease close if duplicate.'
|
||||
comment-body: '${index}. ${similarity} #${number}'
|
||||
- name: Automatically close issues that dont follow the issue template
|
||||
uses: lucasbento/auto-close-issues@v1.0.2
|
||||
with:
|
||||
github-token: ${{ steps.generate_token.outputs.token }}
|
||||
issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template."
|
||||
closed-issues-label: "invalid"
|
||||
- name: Check if issue mentions a provider
|
||||
id: provider_check
|
||||
run: |
|
||||
wget --output-document check_issue.py "https://raw.githubusercontent.com/recloudstream/.github/master/.github/check_issue.py"
|
||||
pip3 install httpx
|
||||
export GH_TEXT="${{ github.event.issue.title }} ${{ github.event.issue.body }}"
|
||||
RES="$(python3 ./check_issue.py)"
|
||||
echo "::set-output name=name::${RES
|
||||
- name: Comment if issue mentions a provider
|
||||
if: ${{ steps.provider_check.outputs.name != "none" }}
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
body: |
|
||||
Hello ${{ github.event.issue.user.login }}.
|
||||
Please do not report any provider bugs here. This repository does not contain any providers. Please find the appropriate repository and report your issue there or join the [discord](https://discord.gg/5Hus6fM).
|
||||
|
||||
Found provider name: `${{ steps.provider_check.outputs.name }}`
|
||||
- name: Add eyes reaction to all issues
|
||||
uses: actions-cool/emoji-helper@v1.0.0
|
||||
with:
|
||||
type: 'issue'
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
emoji: 'eyes'
|
||||
- name: Automatically close issues that dont follow the issue template
|
||||
uses: lucasbento/auto-close-issues@v1.0.2
|
||||
with:
|
||||
github-token: ${{ steps.generate_token.outputs.token }}
|
||||
issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template."
|
||||
losed-issues-label: "invalid"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue