Thank you for your interest in contributing to Pipeleek! This guide will help you get started with the development environment and provide guidelines for contributing.
The fastest way to start contributing is using GitHub Codespaces:
- Click the "Code" button on the repository page
- Select the "Codespaces" tab
- Click "Create codespace on main" (or your branch)
The codespace will automatically:
- Set up Go 1.24+ environment
- Install golangci-lint for code linting
- Install Python and MkDocs for documentation
- Download all Go dependencies
- Build the pipeleek binary
Once the codespace is ready, you can start working immediately since the Go module is at the repository root.
If you prefer local development:
- Go 1.24 or higher
- golangci-lint (for linting)
- Python 3.x with pip (for documentation)
-
Clone the repository:
git clone https://github.com/CompassSecurity/pipeleek.git cd pipeleek -
Install golangci-lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
-
Download dependencies:
go mod download
-
Run it:
go run cmd/pipeleek/main.go
-
Optional: Build the binary:
make build
make build# Run all tests (unit + e2e)
make test
# Run unit tests only
make test-unit
# Run e2e tests
make test-e2e
# Run e2e tests for specific platform
make test-e2e-gitlab
make test-e2e-github
make test-e2e-bitbucket
make test-e2e-devops
make test-e2e-giteamake lint# Generate coverage report
make coverage
# Generate and view HTML coverage report
make coverage-html# Generate and serve documentation locally
make serve-docspipeleek/
├── cmd/pipeleek/ # CLI entry point (main.go)
├── internal/cmd/ # CLI commands (Cobra) - internal package
│ ├── bitbucket/ # BitBucket commands
│ ├── devops/ # Azure DevOps commands
│ ├── flags/ # Common CLI flags
│ ├── gitea/ # Gitea commands
│ ├── github/ # GitHub commands
│ ├── gitlab/ # GitLab commands
├── pkg/ # Core business logic
├── tests/e2e/ # End-to-end tests
├── docs/ # Documentation (MkDocs)
├── go.mod # Go module definition
├── Makefile # Build commands
└── .devcontainer/ # GitHub Codespaces config
- Follow standard Go conventions and idioms
- Use
zerologfor structured logging - Write tests for new functionality
- Keep CLI commands in
internal/cmd/and business logic inpkg/
- Use clear, descriptive commit messages
- Reference issue numbers when applicable
- Create a feature branch from
main - Make your changes with appropriate tests
- Ensure all tests pass:
make test - Ensure linting passes:
make lint - Submit a pull request with a clear description
- Write table-driven tests where appropriate
- Use
testify/assertfor assertions - Place unit tests next to the code they test
- Place e2e tests in
tests/e2e/ - Use
t.Parallel()where safe - Use
t.TempDir()for temporary files
- Open an issue for bugs or feature requests
- Check existing issues before creating new ones
- Join discussions in pull requests
By contributing, you agree that your contributions will be licensed under the project's license.