Introduce AI assistant rules and commands #928
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 Branch Name Rules | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| enforce-branch-rules: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check branch name | |
| run: | | |
| echo "Source branch: ${{ github.head_ref }}" | |
| if [[ "${{ github.head_ref }}" != feature/* && \ | |
| "${{ github.head_ref }}" != bugfix/* && \ | |
| "${{ github.head_ref }}" != release/* && \ | |
| "${{ github.head_ref }}" != dependabot/* && \ | |
| "${{ github.head_ref }}" != latest && \ | |
| "${{ github.head_ref }}" != fe/* && \ | |
| "${{ github.head_ref }}" != be/* && \ | |
| "${{ github.head_ref }}" != e2e/* && \ | |
| "${{ github.head_ref }}" != ric/* ]]; then | |
| echo "❌ Pull requests to 'main' are only allowed from 'feature/**', 'bugfix/**', 'release/**', 'dependabot/**', 'latest' or 'ric/**' branches." | |
| exit 1 | |
| fi |