Skip to content

Contributing

Markdown · llms.txt

Thank you for your interest in contributing to opa-authzen-plugin! This guide will help you get started.

  • Go 1.26.1 or later (see .go-version)
  • GNU Make
  • Git
Terminal window
make build # Build the binary
make test # Run all tests
make fmt # Format code
make vet # Run static analysis
Terminal window
# Run all tests
make test
# Run tests with race detector
go test -v -race ./...
# Run a specific test
go test -v -run TestName ./internal
Terminal window
git clone https://github.com/dyokto/opa-authzen-plugin.git
cd opa-authzen-plugin
Terminal window
git checkout -b fix/your-fix
# or
git checkout -b feat/your-feature
  • Keep changes focused on a single issue or feature
  • Write clear commit messages
  • Add or update tests as appropriate

All commits must be signed off with the Developer Certificate of Origin (DCO):

Terminal window
git commit -s -m "Brief description of changes"

The -s flag adds a Signed-off-by: line to your commit message. This confirms that you have the right to contribute the code under the Apache 2.0 license.

Terminal window
git push origin fix/your-fix

Then create a PR on GitHub. Include:

  • A clear description of what your PR does
  • References to any related issues
  • Test coverage for new functionality
  • Follow effective Go
  • Format code with go fmt
  • Run go vet before submitting
  • Keep lines under 100 characters where reasonable
  • Write table-driven tests (see internal/internal_test.go for examples)
  • All tests must pass: make test
  • Run tests with race detector for concurrency validation: go test -v -race ./...
  • Update README.md for user-facing changes
  • Add comments to non-obvious code
  • Update .github/copilot-instructions.md if architectural patterns change

By contributing, you agree that your contributions will be licensed under the Apache License 2.0.