Skip to content
Open
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
47 changes: 47 additions & 0 deletions .github/rulesets/conventional-branch-naming.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "Conventional Branch Naming",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [
"refs/heads/main",
"refs/heads/master",
"refs/heads/develop",
"refs/heads/staging",
"refs/heads/production"
],
"include": [
"~ALL"
]
}
},
"rules": [
{
"type": "creation",
"parameters": {
"restricted_ref_names": {
"patterns": [
{
"operator": "regex",
"pattern": "^(?!refs/heads/(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)/.+$).*"
}
]
}
}
},
{
"type": "update",
"parameters": {
"update_allows_fetch_and_merge": true
}
}
],
"bypass_actors": [
{
"actor_id": 5,
"actor_type": "RepositoryRole",
"bypass_mode": "always"
}
]
}
14 changes: 13 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,19 @@ Components use Bootstrap 5 for styling and Chart.js for visualizations.
### Branching Strategy

- **main branch**: Primary branch for all development and production
- Branch naming: Use semantic prefixes (`feat/`, `fix/`, `docs/`, etc.)
- **Branch naming**: Must follow [conventional branch naming](https://conventional-branch.github.io/) with these prefixes:
- `feat/` - New features
- `fix/` - Bug fixes
- `docs/` - Documentation changes
- `style/` - Code style changes (formatting, whitespace)
- `refactor/` - Code refactoring without changing behavior
- `perf/` - Performance improvements
- `test/` - Test additions or changes
- `build/` - Build system or dependency changes
- `ci/` - CI/CD configuration changes
- `chore/` - Maintenance tasks
- `revert/` - Revert previous commits
- **Enforcement**: GitHub rulesets enforce conventional branch naming for all branches (except `main`, `develop`, `staging`, `production`)

### Making Changes

Expand Down
20 changes: 17 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,23 @@ Please use the [Kanban board](https://github.com/orgs/RSE-Sheffield/projects/19)
1. [Raise an issue](https://github.com/RSE-Sheffield/SORT/issues/new?template=Blank+issue) clearly describing the
problem or user requirements;
2. [Create a branch](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-a-branch-for-an-issue)
that is associated with that issue. It can be helpful to prefix the branch name to match the type of changes
e.g. `feat/123-my-feature` for features or `docs/my-guide` for documentation, etc.
See [Semantic branch names](https://damiandabrowski.medium.com/semantic-branch-names-and-commit-messages-3ac38a6fcbb6).
that is associated with that issue. Branch names must follow [conventional branch naming](https://conventional-branch.github.io/)
with one of these prefixes:
- `feat/` - New features
- `fix/` - Bug fixes
- `docs/` - Documentation changes
- `style/` - Code style changes (formatting, whitespace)
- `refactor/` - Code refactoring without changing behavior
- `perf/` - Performance improvements
- `test/` - Test additions or changes
- `build/` - Build system or dependency changes
- `ci/` - CI/CD configuration changes
- `chore/` - Maintenance tasks and other changes
- `revert/` - Revert previous commits

Examples: `feat/123-user-authentication`, `fix/survey-validation`, `docs/deployment-guide`

Note: GitHub branch protection rules enforce this naming convention for all branches except `main`, `develop`, `staging`, and `production`.
3. In that branch, make changes that aim to resolve that issue;
4. Create
a [draft pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests) (
Expand Down