Refactor imports and improve code formatting across multiple files #1
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: Core Protection | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| check-integrity: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: dorny/paths-filter@v2 | |
| id: changes | |
| with: | |
| filters: | | |
| core: | |
| - 'bot/core/**' | |
| - 'bot/loader.py' | |
| - 'requirements.txt' | |
| - name: Check for core violations | |
| if: steps.changes.outputs.core == 'true' | |
| run: | | |
| echo "User ${{ github.actor }} has modified core files in this PR." | |
| if [ "${{ github.actor }}" != "dependabot[bot]" ] && [ "${{ github.actor }}" != "trynogaunt" ]; then | |
| echo "⚠️ ALERT: Core files have been modified by ${{ github.actor }} in this PR." | |
| exit 1 | |
| else | |
| echo "✅ Core files modified by ${{ github.actor }}, allowing PR to proceed." | |
| fi |