Skip to content

Latest commit

 

History

History
65 lines (49 loc) · 2.25 KB

CONTRIBUTING.md

File metadata and controls

65 lines (49 loc) · 2.25 KB

Contributing to GoBot

Thanks for helping improve GoBot. Small, focused changes are easiest to review and maintain.

Before you start

  • Read the relevant guide in docs/.
  • Do not commit .env files, API keys, passwords, local databases, or built binaries.
  • Keep public examples generic; never add real credentials, private addresses, or deployment-only configuration.

Local checks

GoBot targets Go 1.26.10+ (or 1.27.3+ for the Go 1.27 series). Before opening a pull request:

go test ./...
go vet ./...
go test -race ./plugins
git diff --check
make build

Use gofmt on changed Go files. If a change adds a plugin or configuration option, include focused tests and update the relevant guide under docs/.

For changes to the rendered !ask fallback or its browser dependencies, also run the offline browser fixtures with your Chrome/Chromium executable:

GOBOT_TEST_BROWSER=/path/to/chrome go test -race ./plugins -run 'TestAskRendered' -count=1

These fixtures use synthetic pages without contacting DuckDuckGo or sending IRC messages. CI runs them with the runner's installed browser as well.

Branches and pull requests

  • Start from an up-to-date main branch.
  • Use a focused branch name such as feature/..., fix/..., or docs/....
  • Explain what changed, how it was tested, and whether a config change or restart is required.
  • Add only safe example values to the tracked config.yaml; keep real deployment values on the host.
  • Open a pull request against main and wait for GoBot CI, CodeQL, and any required checks to finish before merging.
  • Never force-push or bypass branch protection on main.

Design and safety

  • Keep IRC responses bounded so a command does not create a flood.
  • Validate user input and use timeouts for external HTTP requests.
  • Avoid new dependencies unless they solve a clear problem.
  • Do not expose secrets in logs, metrics, or IRC responses.

Useful links: