[feat] [Insert_Video_ID] missing transcript #12
This file contains hidden or 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
| name: Check Issue Checkboxes | |
| on: | |
| issues: | |
| types: [opened, edited] | |
| jobs: | |
| check-checkboxes: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check if Issue has the 'missing transcript' label | |
| id: label-check | |
| run: | | |
| echo "labels=${{ toJson(github.event.issue.labels) }}" > labels.json | |
| if grep -q 'missing transcript' labels.json; then | |
| echo "missing_transcript=true" >> $GITHUB_ENV | |
| else | |
| echo "missing_transcript=false" >> $GITHUB_ENV | |
| fi | |
| - name: Check for unchecked checkboxes | |
| id: check | |
| if: ${{ env.missing_transcript == 'true' }} | |
| run: | | |
| echo "issue_body=${{github.event.issue.body}}" > issue_body.json | |
| if grep -q '- \[ \]' issue_body.json; then | |
| echo "unchecked=true" >> $GITHUB_ENV | |
| echo "Unchecked checkboxes found!" | |
| else | |
| echo "unchecked=false" >> $GITHUB_ENV | |
| fi | |
| - name: Comment on Issue if unchecked checkboxes are found | |
| if: ${{ env.unchecked == 'true' && env.missing_transcript == 'true' }} | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| issue-number: ${{ github.event.issue.number }} | |
| body: | | |
| ⚠️ It looks like some checkboxes in your issue are not checked. | |
| Please ensure you have confirmed all the checkboxes are valid before opening an issue. | |
| The issue will be closed if the checkboxes are not checked. |