Notes: Add form submission shortcut #75862
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: Enforce labels on Pull Request | |
| on: | |
| pull_request_target: | |
| types: [labeled, unlabeled, ready_for_review, review_requested] | |
| # Disable permissions for all available scopes by default. | |
| # Any needed permissions should be configured at the job level. | |
| permissions: {} | |
| jobs: | |
| type-related-labels: | |
| runs-on: 'ubuntu-24.04' | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - uses: mheap/github-action-required-labels@v5 | |
| with: | |
| mode: exactly | |
| count: 1 | |
| labels: '^\[Type\]' | |
| use_regex: true | |
| add_comment: true | |
| message: "**Warning: Type of PR label mismatch**\n\n To merge this PR, it requires {{ errorString }} {{ count }} label indicating the type of PR. Other labels are optional and not being checked here. \n- **Required label**: Any label starting with `[Type]`.\n- **Labels found**: {{ applied }}.\n\nRead more about [Type labels in Gutenberg](https://github.com/WordPress/gutenberg/labels?q=type). Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task." | |
| exit_type: failure |