Skip to content

Latest commit

 

History

History
209 lines (147 loc) · 3.67 KB

CONTRIBUTING.md

File metadata and controls

209 lines (147 loc) · 3.67 KB

Contributing to cert-toolkit-shell

Branch Model

Main Branch

  • main - Production-ready code, protected branch

Feature Branches

Create from main, merge back to main via pull request:

git checkout -b feature/description main

Hotfix Branches

Create from main, merge back to main via pull request:

git checkout -b hotfix/issue-description main

Workflow

  1. Create Feature Branch
git checkout main
git pull
git checkout -b feature/your-feature
  1. Keep Current
# Update your branch with main
git fetch origin
git rebase origin/main
  1. Develop and Test
# Make changes
# Add tests
# Run tests
bats test/
  1. Create Pull Request
gh pr create --base main --head feature/your-feature

Pull Request Process

  1. Ensure all tests pass
  2. Update documentation
  3. Request review
  4. Address feedback
  5. Squash and merge to main

See Development Guide for detailed standards.

Development Standards

All contributions must follow our standards:

Workflow Examples

Feature Development

# Start new feature
git checkout main
git pull
git checkout -b feature/add-cert-validation

# Regular commits
git add src/lib/validators.sh
git commit -m "feat: add certificate validation

- Add chain validation
- Add expiry checking
- Add signature verification
- Add unit tests"

# Update with main
git fetch origin
git rebase origin/main

# Push and create PR
git push -u origin feature/add-cert-validation
gh pr create --base main --head feature/add-cert-validation

Hotfix Process

# Create hotfix branch
git checkout main
git checkout -b hotfix/fix-cert-parsing

# Fix and test
git add src/lib/processors.sh
git commit -m "fix: correct certificate parsing error

- Fix PEM header detection
- Add regression test
- Update documentation"

# Create PR
gh pr create --base main --head hotfix/fix-cert-parsing --label hotfix

Code Review

# Address review feedback
git add src/lib/validators.sh
git commit -m "refactor: address review feedback

- Improve error messages
- Add more test cases
- Update documentation"

# Update PR
git push

# After approval, squash and merge via GitHub UI

Development Process

1. Code Quality

  • ShellCheck compliance
  • No TODOs in code
  • Clear documentation
  • Complete test coverage

2. Testing Requirements

  • All tests pass
  • New tests added
  • Edge cases covered
  • Debug state verified

3. Documentation Updates

  • Update relevant docs
  • Add examples
  • Clear descriptions
  • Version updates

4. Review Process

  • Self-review first
  • Address feedback
  • Update tests
  • Verify changes

Release Process

Version Updates

# Update version in cert-manager.sh
VERSION="1.0.0"

# Tag release
git tag -a v1.0.0 -m "Version 1.0.0"

Release Checklist

  • All tests pass
  • Documentation updated
  • Version bumped
  • Changelog updated
  • Tagged release
  • Release notes created

Getting Help

  • GitHub Issues: Bug reports, features
  • Pull Requests: Contributions
  • Documentation: Questions

Additional Resources

Related Documentation