refactor: enhance home screen loading. #1300
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: Branch Name Check | |
| on: | |
| pull_request: | |
| types: [ opened, edited, synchronize, reopened ] | |
| jobs: | |
| check-branch-name: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check Branch Name | |
| uses: actions/github-script@v6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const branchName = context.payload.pull_request.head.ref; | |
| const regex = /^(feature|feat|fix|test|refactor|chore|style|docs|component|ci)\/[\w-\/.]+$/; | |
| if (!regex.test(branchName)) { | |
| core.setFailed('Branch name does not match the required format: <type>/<branch-name>. Allowed types: feature,feat,fix,test,refactor,chore,style,docs'); | |
| } else { | |
| console.log('Branch name matches the required format'); | |
| } |