Skip to content

Bump @testing-library/jest-dom from 6.9.1 to 7.0.0 in /frontend #402

Bump @testing-library/jest-dom from 6.9.1 to 7.0.0 in /frontend

Bump @testing-library/jest-dom from 6.9.1 to 7.0.0 in /frontend #402

name: Enforce Branch Name Semantics
on:
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
lint-branch-name:
name: Lint Branch Name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/github-script@v6
with:
result-encoding: string
script: |
const enforceSemantic = (branchName) => {
const semanticFormat = /^(feat|feature|fix|chore|refactor|dependabot|docs|style|test|ci)\//
if (!semanticFormat.test(branchName)) {
core.setFailed(
`Branch names in PRs should use semantic conventions, e.g. (feat, fix, chore, refactor, ci). ` +
`To fix, run: git branch -m <old_branch_name> <new_branch_name> && git push origin -u <new_branch_name>. ` +
`For more details, please review https://www.conventionalcommits.org/ and https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716`)
}
}
const currentBranch = context.payload.pull_request.head.ref
enforceSemantic(currentBranch)