Thanks for considering a contribution! This document explains how to get your change merged with the least friction.
- Report bugs — open an issue with reproduction steps, version, and deployment mode (Docker, Helm, source).
- Request features — open a discussion first if it's a significant change. Small additions can go straight to an issue.
- Improve docs — Markdown lives under
src/and is built with mdBook. The pre-rendered HTML inbook/is generated; do not hand-edit. - Submit code — see below.
- Search existing issues and PRs — your idea may already be tracked.
- For non-trivial changes, open an issue first. This avoids wasted work if the design needs to be different. Maintainers usually respond within a few days.
- Read the user docs under
src/to understand the existing architecture, configuration model, and extension points before proposing changes.
# Requires Go 1.23.1+
go build ./...
go vet ./...
go test ./...
# Run locally (needs config/config.yaml relative to CWD)
go build -o run ./cmd
./runHealth check: curl http://localhost:3000/healthz.
For Docker / Helm flows see the README.
- Idiomatic Go. Run
gofmt -w .andgo vet ./...before pushing. - No unused variables or parameters. Use
_with a comment when a parameter is intentionally unused. - Wrap errors with
%w(fmt.Errorf("...: %w", err)). - Match the existing import grouping — stdlib, third-party, then
github.com/VersusControl/...separated by blank lines. - Don't introduce new dependencies casually. The project deliberately keeps a small surface (Fiber, Viper, AWS SDK v2, slack-go, redis, uuid). Justify new modules in the PR description.
- Per-provider files live in
pkg/common/<provider>.go(one file per provider). - No phase references in code comments. Roadmap phases belong in planning docs, not in code. Code comments describe what the code does today.
For extension points (new alert channel, on-call provider, queue
listener, signal source) follow the patterns in pkg/common/ and
pkg/signalsources/ and look at the existing factory files
(factory_alert.go, factory_oncall.go, factory_listener.go).
- Tests live alongside code in
*_test.gofiles. - Use
t.TempDir()for any file I/O — no hardcoded/tmppaths. - Use
net/http/httptestfor HTTP-level tests; never make real network calls. - Prefer table-driven tests for multiple input cases.
- Run
go test ./...and confirm it passes before opening a PR.
Follow Conventional Commits. The git history uses prefixes like:
feature: add detect service for ai sre agent
fix: handle empty regex pattern
docs: update AI agent configuration
Common types: feature, fix, docs, refactor, test, chore.
- Fork the repo and create a branch from
main:git checkout -b feature/short-description - Make your change with a clear, focused commit history.
- Add or update tests. PRs that change behavior without test coverage will be asked to add tests.
- Update relevant docs under
src/if user-facing behavior changes. - Update
ROADMAP.mdif your PR closes a roadmap item. - Run
go test ./...,go vet ./...,gofmt -w .. - Push your branch and open a PR. Fill in the PR template.
- Be responsive to review comments. Maintainers will squash-merge once approved.
- Unscoped refactors mixed in with the actual change.
- Hardcoded secrets, tokens, or webhook URLs in source or YAML.
- Disabling tests instead of fixing them.
- Adding a dependency without justification.
- Drive-by formatting of unrelated files.
If you find a security issue, do not open a public PR or issue. Follow
the process in SECURITY.md.
By contributing, you agree that your contributions will be licensed under the MIT License that covers the project.
This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold it.
- GitHub Discussions: https://github.com/VersusControl/versus-incident/discussions
- Issues: https://github.com/VersusControl/versus-incident/issues
- Email:
supports@devopsvn.tech