mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-16 17:18:21 +00:00
Fixes GHSA-32gr-rm34-5j4v Thanks for reporting this vulnerability gaussandhisgun! Co-authored-by: mr-wewlad <mr-wewlad>
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
name: Close low effort issues
|
|
|
|
on:
|
|
issues:
|
|
types:
|
|
- opened
|
|
|
|
jobs:
|
|
check_issue_quality:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
IS_LOW_EFFORT: ${{ steps.check_issue_quality.outputs.isLowEffort }}
|
|
steps:
|
|
- env:
|
|
ISSUE_TITLE: ${{ github.event.issue.title }}
|
|
name: Check issue quality
|
|
id: check_issue_quality
|
|
run: |
|
|
declare -a DEFAULT_TITLES=("[BUG]" "[FEATURE]" "[DISCUSSION]" "[QUESTION]")
|
|
for i in "${DEFAULT_TITLES[@]}"
|
|
do
|
|
echo "$i"
|
|
if [ "$ISSUE_TITLE" == "$i" ]; then
|
|
echo "low effort"
|
|
echo "isLowEffort=true" >> $GITHUB_OUTPUT
|
|
break
|
|
else
|
|
echo "NOT low effort"
|
|
echo "isLowEffort=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
done
|
|
|
|
close_issue:
|
|
runs-on: ubuntu-latest
|
|
needs: check_issue_quality
|
|
if: ${{ needs.check_issue_quality.outputs.IS_LOW_EFFORT == 'true' }}
|
|
steps:
|
|
- env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
ISSUE_URL: ${{ github.event.issue.html_url }}
|
|
run: |
|
|
gh issue close $ISSUE_URL -c "Thanks for making this issue! Unfortunately, this issue doesn't have a proper title; therefore this issue has been closed. You can create a new issue again, but this time make sure you improve the title."
|