Skip to content

Provide a general summary of the issue #7

Provide a general summary of the issue

Provide a general summary of the issue #7

Workflow file for this run

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 }}