Add rule syncing to dual-tool agent configuration #3
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: Large File Check | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - '**.py' | |
| jobs: | |
| check-file-sizes: | |
| name: Source File Line Limit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check for large source files | |
| run: | | |
| if [ -n "${{ github.event.pull_request.base.sha }}" ]; then | |
| mapfile -t files < <(git diff --name-only --diff-filter=d "${{ github.event.pull_request.base.sha }}...HEAD" -- '*.py') | |
| if [ "${#files[@]}" -eq 0 ]; then | |
| echo "No source files changed." | |
| exit 0 | |
| fi | |
| scripts/check_large_files.sh "${files[@]}" | |
| else | |
| scripts/check_large_files.sh --all | |
| fi |