2022-08-20 08:59:36 +00:00
name : Issue automatic actions
on :
issues :
types : [ opened, edited]
jobs :
issue-moderator :
runs-on : ubuntu-latest
steps :
- name : Generate access token
id : generate_token
uses : tibdex/github-app-token@v1
with :
app_id : ${{ secrets.GH_APP_ID }}
private_key : ${{ secrets.GH_APP_KEY }}
- name : Similarity analysis
uses : actions-cool/issues-similarity-analysis@v1
with :
token : ${{ steps.generate_token.outputs.token }}
filter-threshold : 0.5
title-excludes : ''
2022-08-20 09:34:32 +00:00
comment-title : '### Your issue looks similar to these issues:.\n\nPlease close if duplicate.'
2022-08-20 08:59:36 +00:00
comment-body : '${index}. ${similarity} #${number}'
2022-08-20 11:07:18 +00:00
- 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
2022-08-20 11:09:20 +00:00
if : steps.provider_check.outputs.name != "none"
2022-08-20 11:07:18 +00:00
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 }}`
2022-08-20 08:59:36 +00:00
- name : Add eyes reaction to all issues
2022-08-20 09:04:02 +00:00
uses : actions-cool/emoji-helper@v1.0.0
2022-08-20 08:59:36 +00:00
with :
2022-08-20 09:04:02 +00:00
type : 'issue'
2022-08-20 08:59:36 +00:00
token : ${{ steps.generate_token.outputs.token }}
2022-08-20 09:05:04 +00:00
emoji : 'eyes'
2022-08-20 09:34:32 +00:00