Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
BASE_REF: ${{ github.base_ref }}
run: |
words='[a-z0-9]+(-[a-z0-9]+)*'
work="^(feature|bugfix|chore)/${words}$"
work="^(feature|bugfix|chore|tests)/${words}$"
hotfix="^hotfix/${words}$"
release='^release/v[0-9]{4}\.[0-9]{2}\.[0-9]{2}(\.[0-9]+)?$'
github_made='^(revert-[0-9]+-|dependabot/)'
fail() { echo "::error::$1"; exit 1; }

if [[ ! ( "$HEAD_REF" =~ $work || "$HEAD_REF" =~ $hotfix || "$HEAD_REF" =~ $release \
|| "$HEAD_REF" == "main" || "$HEAD_REF" =~ $github_made ) ]]; then
fail "Branch '$HEAD_REF' must be named feature/..., bugfix/..., chore/... (lower case, words joined by single hyphens), e.g. bugfix/fas-port-reconnect. Rename it on GitHub (Branches page, pencil icon) - that keeps this PR."
fail "Branch '$HEAD_REF' must be named feature/..., bugfix/..., chore/..., tests/... (lower case, words joined by single hyphens), e.g. bugfix/fas-port-reconnect. Rename it on GitHub (Branches page, pencil icon) - that keeps this PR."
fi

case "$BASE_REF" in
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Read that first.** In short:

- `dev` collects finished work for hardware testing; `main` is what prod runs.
- Branch from `dev` as `feature/...`, `bugfix/...` or `chore/...`, e.g. `bugfix/fas-port-reconnect`.
- Branch from `dev` as `feature/...`, `bugfix/...`, `chore/...` or `tests/...`, e.g. `bugfix/fas-port-reconnect`.
- Open a PR **into `dev`**, titled `type(scope): what changed`, and fill in the template.
- CI green + 1 approval (a lead's if it can move hardware), then **Squash and merge**.
- Leads bring tested releases into `main`; you never merge into `main` yourself.
Expand Down
Loading