| # Copyright 2013 The Flutter Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| name: Material and Cupertino Code Freeze |
| |
| on: |
| pull_request_target: |
| types: [opened, reopened, synchronize, ready_for_review, labeled, unlabeled] |
| branches: |
| - master |
| merge_group: |
| branches: |
| - master |
| |
| permissions: read-all |
| |
| jobs: |
| check_freeze: |
| name: Check Code Freeze |
| runs-on: ubuntu-latest |
| if: ${{ github.repository == 'flutter/flutter' }} |
| |
| steps: |
| - name: Check for changes in frozen folders |
| if: github.event_name != 'merge_group' |
| uses: dorny/paths-filter@v3 |
| id: filter |
| with: |
| token: ${{ github.token }} |
| filters: | |
| frozen: |
| - 'packages/flutter/lib/src/material/**' |
| - 'packages/flutter/lib/src/cupertino/**' |
| - 'packages/flutter/test/material/**' |
| - 'packages/flutter/test/cupertino/**' |
| - 'examples/api/lib/material/**' |
| - 'examples/api/lib/cupertino/**' |
| - 'examples/api/test/material/**' |
| - 'examples/api/test/cupertino/**' |
| - 'packages/flutter/lib/fix_data/fix_cupertino.yaml' |
| - 'packages/flutter/lib/fix_data/fix_material/**' |
| - 'packages/flutter/test_fixes/material/**' |
| - 'packages/flutter/test_fixes/cupertino/**' |
| |
| - name: Fail on frozen changes |
| if: github.event_name != 'merge_group' && steps.filter.outputs.frozen == 'true' && !contains(github.event.pull_request.labels.*.name, 'override code freeze') |
| run: | |
| echo "Error: Code changes detected during the current code freeze." |
| echo "If this is a critical fix that must land, please file an issue for team-design." |
| echo "Info: https://github.com/flutter/flutter/issues/184093" |
| exit 1 |