Thank you for your interest in contributing to Case Hub! This guide will help you get started.
Trigger an automatic rebase of your PR branch onto the base branch by commenting:
/rebase
How it works:
- Comment
/rebaseon any pull request - The GitHub Action will automatically:
- Fetch the latest base branch
- Rebase your PR branch onto it
- Force-push the rebased branch
- You'll receive a reaction and comment with the result:
- ✅ 🚀 Success — PR rebased successfully
- ❌ 😕 Conflict — Manual rebase required
Example:
/rebase
The bot will react with 👀 to acknowledge your command, then perform the rebase.
Trigger a rerun of CI tests for your PR by commenting:
/retest
How it works:
- Comment
/reteston any pull request - The GitHub Action will automatically:
- Find the latest Maven CI workflow run for your PR
- Restart the workflow
- You'll receive a reaction and comment with the result:
- ✅ 🚀 Success — Tests restarted
- ❌ 😕 Failure — No workflow run found or restart failed
When to use:
- After fixing a flaky test failure
- When CI encountered a temporary infrastructure issue
- To verify tests still pass after discussion or review
Example:
/retest
The bot will react with 👀 to acknowledge your command, then restart the tests.
If the automatic rebase fails due to conflicts, you'll need to rebase manually:
# Fetch latest changes
git fetch origin
# Checkout your branch
git checkout your-branch-name
# Rebase onto main (or target branch)
git rebase origin/main
# Resolve conflicts
# Edit conflicting files, then:
git add .
git rebase --continue
# Repeat until rebase completes
# Force push with lease (safer than --force)
git push --force-with-leaseAborting a rebase:
git rebase --abort- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/casehub-engine.git cd casehub-engine - Add upstream remote:
git remote add upstream https://github.com/ORIGINAL_OWNER/casehub-engine.git
- Install dependencies:
./mvnw clean install
- Create a feature branch:
git checkout -b feature/your-feature-name
- Make your changes
- Run tests:
./mvnw test - Format code:
./mvnw spotless:apply
- Commit your changes:
git add . git commit -m "feat: add your feature description"
- Push to your fork:
git push origin feature/your-feature-name
- Create a Pull Request on GitHub
- Enable "Allow edits from maintainers" (required for
/rebaseto work on forks) - Wait for CI checks to complete
- Address review feedback if any
All code contributions must meet the following standards:
- Spotless enforces Google Java Format
- Run before committing:
./mvnw spotless:apply
- Check formatting:
./mvnw spotless:check
- No wildcard imports (
import java.util.*❌) - No
@authortags in JavaDoc - No redundant imports
Violations will fail the build. Check locally:
./mvnw checkstyle:check- Use meaningful variable names
- Keep methods focused and small
- Add JavaDoc for public APIs
- Write descriptive commit messages
All tests:
./mvnw testSpecific module:
./mvnw test -pl engineSpecific test:
./mvnw test -Dtest=WorkerRetryExtendedTestWith persistence profile:
# In-memory persistence (faster, no Docker)
./mvnw test -pl engine -Ppersistence-memory
# Hibernate persistence (requires PostgreSQL)
./mvnw test -pl engine -Ppersistence-hibernate- Use descriptive test method names
- Follow AAA pattern (Arrange, Act, Assert)
- Use
@QuarkusTestfor integration tests - Mock external dependencies
- Test both happy path and edge cases
Triggers: All pull requests
What it does:
- Builds the project with Maven
- Runs all unit and integration tests
- Uploads test reports as artifacts (retained for 5 days)
- Tests on multiple OS/Java/Maven versions
Test matrix:
- OS: Ubuntu
- Java: 17 (Temurin)
- Maven: Multiple versions
Triggers: /rebase command in PR comments
What it does:
- Rebases PR branch onto base branch
- Handles conflicts gracefully
- Provides feedback via reactions and comments
Permissions required:
- Fork PRs: "Allow edits from maintainers" must be enabled
- Branch PRs: Automatic
Triggers: /retest command in PR comments
What it does:
- Finds the latest Maven CI workflow run for the PR
- Restarts the workflow to rerun all tests
- Provides feedback via reactions and comments
When to use:
- Flaky test failures
- Temporary CI infrastructure issues
- Post-review verification without code changes
We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style changes (formatting, whitespace)refactor: Code refactoring (no functional changes)test: Adding or updating testschore: Build process, dependencies, tooling
Examples:
feat(engine): add worker retry mechanism with exponential backoff
fix(persistence): resolve race condition in InMemoryEventLogRepository
docs(readme): update quick start guide with YAML examples
test(engine): add flakiness test for WorkerRetryExtendedTest
- Issues: Use GitHub Issues for bug reports and feature requests
- Discussions: Use GitHub Discussions for questions
- Documentation: See README.md and .github/README.md
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.