Thank you for your interest in contributing to aSSO! This document provides guidelines and standards for contributing to this project.
This project uses Conventional Commits for all commit messages. This leads to more readable messages that are easy to follow when looking through the project history, and enables automatic version bumping and changelog generation.
Each commit message consists of a header, an optional body, and an optional footer:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
The header is mandatory and must conform to the Conventional Commits format.
Must be one of the following:
- feat: A new feature (triggers MINOR version bump)
- fix: A bug fix (triggers PATCH version bump)
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, etc.)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- build: Changes that affect the build system or external dependencies
- ci: Changes to CI configuration files and scripts
- chore: Other changes that don't modify src or test files
- revert: Reverts a previous commit
The scope is optional and should be a noun describing a section of the codebase surrounded by parentheses:
Examples: feat(ui), fix(auth), docs(readme)
Common scopes:
ui- User interface / TUI changesauth- Authentication/SSO relatedaws- AWS SDK integrationk8s- Kubernetes integrationconfig- Configuration handlingcli- Command-line interface
The description is a short summary of the code changes:
- Use the imperative, present tense: "change" not "changed" nor "changes"
- Don't capitalize the first letter
- No period (.) at the end
- Keep it under 72 characters
The body is optional and should provide additional context about the changes:
- Use the imperative, present tense
- Include motivation for the change
- Contrast this with previous behavior
- Wrap at 100 characters
The footer is optional and should contain:
- Breaking Changes: Must start with
BREAKING CHANGE:followed by a description - Issue References:
Closes #123,Fixes #456,Refs #789
feat: add SSO authentication cancellation
Allow users to cancel SSO authentication flow by pressing esc or q
feat(ui): add bordered panes with focus indicators
- Add FocusedPaneBorderStyle and UnfocusedPaneBorderStyle
- Update profile list view with bordered panes
- Update company view with 3-pane bordered layout
- Active pane shows bright blue border
- Inactive panes show gray border
fix(ui): correct profile list scaling on small terminals
Improve viewport calculation to prevent content overflow when
terminal height is less than 30 lines.
feat(api)!: change profile name format
BREAKING CHANGE: Profile names now use format company-env instead of company_env.
This affects all existing profiles and requires migration.
Migration: Run `asso migrate-profiles` to update existing profiles.
docs: update CLAUDE.md with session 4 notes
Document SSO cancellation feature and bordered panes implementation.
refactor(view): consolidate pane width calculations
Extract common pane width logic into helper function to reduce
duplication between profile list and company views.
This project includes a Git hook that automatically validates commit messages. If your commit message doesn't follow the Conventional Commits format, the commit will be rejected with a helpful error message.
To test your commit message format before committing:
echo "feat: my commit message" | grep -E '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\([a-z0-9\-]+\))?: .{1,50}'This project follows Semantic Versioning (SemVer):
Given a version number MAJOR.MINOR.PATCH:
- MAJOR version increments indicate incompatible API changes
- MINOR version increments indicate new features in a backwards-compatible manner
- PATCH version increments indicate backwards-compatible bug fixes
feat:commits → MINOR version bumpfix:commits → PATCH version bumpBREAKING CHANGE:in footer → MAJOR version bump- Other commit types → No version bump (included in next release)
Versions are managed manually based on the Conventional Commits since release:
# Review commits since last tag
git log $(git describe --tags --abbrev=0)..HEAD --oneline
# Create new version tag
git tag -a v0.2.0 -m "Release v0.2.0"
git push origin v0.2.0-
Clone the repository
git clone <repository-url> cd aSSO
-
Install dependencies
go mod download
-
Install development tools (optional)
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
-
Verify hooks are executable
chmod +x .git/hooks/commit-msg
-
Create a feature branch
git checkout -b feat/my-new-feature # or git checkout -b fix/issue-123 -
Make your changes
- Write code
- Add tests
- Update documentation
-
Test your changes
go test -short ./... go build -o asso ./asso # Manual testing
-
Commit your changes
git add . git commit -m "feat: add my new feature"
The commit-msg hook will validate your message format.
-
Push and create PR (if applicable)
git push origin feat/my-new-feature
- Commit early and often: Make small, logical commits
- Each commit should be atomic: One logical change per commit
- Keep commits focused: Don't mix multiple unrelated changes
- Build should pass after each commit: Every commit should leave the code in a working state
Examples of good commit granularity:
git commit -m "feat(ui): add border style definitions"
git commit -m "feat(ui): apply borders to profile list view"
git commit -m "feat(ui): apply borders to company view"
git commit -m "test(ui): add border focus indicator tests"
git commit -m "docs: document bordered pane feature"- Follow standard Go conventions
- Use
gofmtfor formatting (automatically applied by most editors) - Use meaningful variable and function names
- Add comments for exported functions and complex logic
- Keep functions small and focused
- Use lipgloss for all styling
- Define reusable styles in
styles.go - Keep view rendering logic separate from state management
- Test views with different terminal sizes
# Run all tests
go test ./...
# Run tests without integration tests
go test -short ./...
# Run tests with coverage
go test -short -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
# Run specific test
go test -run TestBorderFocus ./internal/ui/- Write tests for new features
- Write tests for bug fixes
- Use table-driven tests when appropriate
- Mock external dependencies (AWS SDK, kubectl, etc.)
- Use
-shortflag for unit tests
Example test structure:
func TestMyFeature(t *testing.T) {
tests := []struct {
name string
input string
want string
}{
{"case 1", "input1", "output1"},
{"case 2", "input2", "output2"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := MyFeature(tt.input)
if got != tt.want {
t.Errorf("MyFeature() = %v, want %v", got, tt.want)
}
})
}
}If you have questions about contributing, feel free to open an issue for discussion.
Thank you for contributing to aSSO!