Provide a general summary of the issue #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
issues: | |
types: | |
- opened | |
- edited | |
jobs: | |
close-issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if checkbox is checked | |
id: checkbox-check | |
run: | | |
# Parse the issue body to check if the checkbox is unchecked | |
# Modify this logic based on your specific checkbox label | |
if grep "- [X] I didn't read any of this and I just checked the boxes" <<< "${{ github.event.issue.body }}"; then | |
echo "Was checked" | |
echo "check_failure=true" >> $GITHUB_ENV | |
else | |
echo "Was not checked" | |
echo "check_failure=false" >> $GITHUB_ENV | |
fi | |
- name: Close issue if checkbox is unchecked | |
if: env.FAILURE == 'true' | |
run: | | |
gh issue close ${{ github.event.issue.number }} --comment "Auto-closing issue" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |