Thank you for your interest in contributing to the ipctl project! This document provides guidelines and instructions for contributing to this project.
- Code of Conduct
- Getting Started
- Contributor License Agreement
- Development Setup
- Contributing Process
- Pull Request Guidelines
- Pull Request Labels
- Testing
- Code Style
- Documentation
- Getting Help
By participating in this project, you are expected to uphold our Code of Conduct. Please report unacceptable behavior to opensource@itential.com.
- Fork the repository on GitHub
- Clone your fork locally
- Set up the development environment
- Create a feature branch for your changes
- Make your changes and test them
- Submit a pull request
All contributors must sign a Contributor License Agreement (CLA) before their contributions can be merged.
The CLA ensures that:
- You have the right to contribute the code
- Itential has the necessary rights to use and distribute your contributions
- The project remains legally compliant
When you submit your first pull request, you will be prompted to sign the CLA. Please complete this process before your contribution can be reviewed.
- Go 1.24 or later
- Make
- Git
-
Fork and clone the repository:
git clone https://github.com/YOUR-USERNAME/ipctl.git cd ipctl -
Add the upstream remote:
git remote add upstream https://github.com/itential/ipctl.git
-
Install dependencies:
make install
-
Build the project:
make build
-
Verify the setup:
make test
This project uses a fork and pull request model for contributions:
-
Fork the repository to your GitHub account
-
Create a topic branch from
main:git checkout main git pull upstream main git checkout -b feature/your-feature-name
-
Make your changes in logical, atomic commits
-
Test your changes thoroughly
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a pull request against the
mainbranch
Use descriptive branch names with prefixes:
feature/- New featuresfix/- Bug fixeschore/- Maintenance tasksdocs/- Documentation updates
Examples:
feature/add-authentication-supportfix/handle-connection-timeoutchore/update-dependenciesdocs/improve-api-examples
- Ensure your branch is up to date with
main - Run the full test suite:
make test - Add tests for new functionality
- Update documentation if needed
- Sign the Contributor License Agreement (CLA)
Your pull request should include:
- Clear title describing the change
- Detailed description explaining:
- What the change does
- Why the change is needed
- How it was tested
- References to related issues (if applicable)
- Breaking changes (if any)
## Summary
Brief description of what this PR does.
## Changes
- List of specific changes made
- Another change
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
## Related Issues
Closes #123This project uses Release Drafter to automatically generate release notes. Please apply appropriate labels to your pull requests:
feature,enhancement- New features and enhancementsfix,bug,bugfix- Bug fixes and correctionschore,dependencies,refactor- Maintenance, dependency updates, and refactoringdocumentation,docs- Documentation changessecurity- Security fixes and improvementsbreaking,breaking-change- Breaking changes that require major version bump
major- Breaking changes (increments major version)minor- New features (increments minor version)patch- Bug fixes and maintenance (increments patch version)
The Release Drafter will automatically apply labels based on:
- Branch names:
feature/,fix/,chore/prefixes - File changes: Documentation files, dependency files
- PR titles: Keywords like "feat", "fix", "chore"
skip-changelog- Exclude from release notesduplicate,question,invalid,wontfix- Issues that don't represent changes
# Run all tests with linting
make test
# Run unit tests only
scripts/test.sh unittest
# Run specific package tests
go test ./pkg/services/...# Generate coverage report
make coverage
# Run with coverage via script
scripts/test.sh coverage- Place test files alongside the code they test (
*_test.go) - Use testify for assertions
- Mock interfaces, not concrete types
- Use
testdata/directories for test fixtures - Include both positive and negative test cases
- Aim for meaningful coverage of critical paths
# Format code
go fmt ./...
# Run linter
golangci-lint run
# Run vet
go vet ./...- Follow Effective Go guidelines
- Use
gofmtfor formatting (enforced by CI) - Keep functions focused and small
- Use meaningful variable and function names
- Write self-documenting code where possible
- Return errors from functions; never call
log.Fatal()in library code
- Document public APIs and exported functions
- Include usage examples for complex functionality
- Keep documentation up-to-date with code changes
- Code documentation - Godoc comments on exported types and functions
- API documentation - Command reference and usage guides
- User documentation - README and docs/ directory
- Developer documentation - This CONTRIBUTING.md and CLAUDE.md
- Update Godoc comments when changing function signatures
- Add examples for new commands and features
- Update README.md for user-facing changes
- Maintain the CLAUDE.md file for development guidelines
- Documentation: Check the README.md and CLAUDE.md files
- Issues: Search existing issues for similar problems
- Discussions: Use GitHub Discussions for questions
- Maintainer: @privateip
When reporting issues, please include:
- Clear description of the problem
- Steps to reproduce the issue
- Expected vs actual behavior
- Environment information (Go version, OS, etc.)
- Error messages and stack traces (if applicable)
- Use GitHub Discussions for general questions
- Search existing discussions and issues first
- Provide context and specific details
- Be patient and respectful
Contributors who have their pull requests merged will be:
- Listed in the project's contributors
- Mentioned in release notes (when appropriate)
- Recognized in the project documentation
Thank you for contributing to ipctl!
For questions about contributing, please contact opensource@itential.com.