refactor userCache currentPermission as lazy #9
Workflow file for this run
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 changed files number | |
| on: | |
| pull_request: | |
| branches-ignore: [] | |
| jobs: | |
| count_changed_files: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check changed files number | |
| run: | | |
| BASE="${{ github.event.pull_request.base.sha }}" | |
| HEAD="${{ github.event.pull_request.head.sha }}" | |
| echo "Base: $BASE" | |
| echo "Head: $HEAD" | |
| changed_files=$(git diff --name-only "$BASE" "$HEAD") | |
| echo "$changed_files" | |
| changed_files_number=$(echo "$changed_files" | wc -l) | |
| echo "Number of changed files: $changed_files_number" | |
| max=20 | |
| if [ "$changed_files_number" -gt "$max" ]; then | |
| echo "This PR has too many changed files" | |
| exit 1 | |
| else | |
| echo "Number of changed files is acceptable" | |
| fi |