Block Hooks: Set ignored blocks meta in REST API response. #649
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: JavaScript Type Checking | |
| on: | |
| # JavaScript type checking was introduced in 7.0.0. | |
| push: | |
| branches: | |
| - trunk | |
| - '[7-9].[0-9]' | |
| tags: | |
| - '[7-9].[0-9]' | |
| - '[7-9]+.[0-9].[0-9]+' | |
| pull_request: | |
| branches: | |
| - trunk | |
| - '[7-9].[0-9]' | |
| paths: | |
| # This workflow only scans JavaScript files. | |
| - '**.js' | |
| - '**.ts' | |
| - '**.tsx' | |
| # These files configure npm. Changes could affect the outcome. | |
| - 'package*.json' | |
| - '.nvmrc' | |
| - '.npmrc' | |
| # This file configures TypeScript. Changes could affect the outcome. | |
| - 'tsconfig.json' | |
| # This directory contains TypeScript definitions. Changes could affect the outcome. | |
| - 'typings/**' | |
| # Confirm any changes to relevant workflow files. | |
| - '.github/workflows/javascript-type-checking.yml' | |
| - '.github/workflows/reusable-javascript-type-checking-v1.yml' | |
| workflow_dispatch: | |
| # Cancels all previous workflow runs for pull requests that have not completed. | |
| concurrency: | |
| # The concurrency group contains the workflow name and the branch name for pull requests | |
| # or the commit hash for any other events. | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
| cancel-in-progress: true | |
| # Disable permissions for all available scopes by default. | |
| # Any needed permissions should be configured at the job level. | |
| permissions: {} | |
| jobs: | |
| # Runs JavaScript type checking. | |
| typecheck: | |
| name: JavaScript type checking | |
| uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-type-checking-v1.yml@trunk | |
| permissions: | |
| contents: read | |
| if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} | |
| slack-notifications: | |
| name: Slack Notifications | |
| uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk | |
| permissions: | |
| actions: read | |
| contents: read | |
| needs: [ typecheck ] | |
| if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} | |
| with: | |
| calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }} | |
| secrets: | |
| SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }} | |
| SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }} | |
| SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }} | |
| SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }} | |
| failed-workflow: | |
| name: Failed workflow tasks | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| actions: write | |
| needs: [ slack-notifications ] | |
| if: | | |
| always() && | |
| github.repository == 'WordPress/wordpress-develop' && | |
| github.event_name != 'pull_request' && | |
| github.run_attempt < 2 && | |
| ( | |
| contains( needs.*.result, 'cancelled' ) || | |
| contains( needs.*.result, 'failure' ) | |
| ) | |
| steps: | |
| - name: Dispatch workflow run | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| retries: 2 | |
| retry-exempt-status-codes: 418 | |
| script: | | |
| github.rest.actions.createWorkflowDispatch({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| workflow_id: 'failed-workflow.yml', | |
| ref: 'trunk', | |
| inputs: { | |
| run_id: `${context.runId}`, | |
| } | |
| }); |