Docs Version v0.2
Docs menu

Project

Contributing to Signari

Changed 3 min readv0.2

On this page

Thank you for wanting to help. This page says how a change gets in: what to open, what a pull request needs, and the one agreement a first contribution asks for.

Reporting

Before you start

For anything larger than a small fix, open an issue first and say what you intend to change. An identity provider has decisions that cannot be reversed lightly (the database schema, the key layer, the session model), and agreeing on the approach before the code saves both of us a rewrite. Those decisions are recorded in the repository's adr/ folder, and a documentation change follows the style guide in contributing/writing-docs.md.

A pull request

Open it against main, one focused change per pull request. It is ready when:

  • It builds and is formatted. From engine/:

    Shellgo build ./... && go vet ./... && test -z "$(gofmt -l .)"
  • It comes with tests of what it adds or fixes, and the suite passes. The engine's tests need a PostgreSQL database and fail without one, rather than skipping the database tests:

    Shellcreatedb signari_testSIGNARI_DSN=postgres:///signari_test go run ./cmd/signari migrate bootstrap   # migration 0001, as a superuserpsql -d signari_test -c '\password signari_engine'                           # 0001 made the role with no passwordSIGNARI_DSN='postgres://signari_engine:<that password>@localhost/signari_test' go run ./cmd/signari migrate upSIGNARI_TEST_DSN=postgres:///signari_test go test -count=1 ./...

    These run as you, over PostgreSQL's local socket, and assume you are a PostgreSQL superuser, as Homebrew's PostgreSQL sets up. On Debian or Ubuntu, make yourself one first with sudo -u postgres createuser --superuser "$USER".

    The console's suite runs from admin/ with composer test, also against PostgreSQL. A fix comes with a test that fails without it.

  • The documentation moves with the code. A new or changed command, setting or Admin API route belongs on Every command, Configuration or the Admin API in the same change; tests in engine/internal/docsync fail the build when code and these pages disagree.

  • It adds no new static-analysis finding. CI runs govulncheck, gosec against engine/gosec-baseline.txt, on GitHub and CodeQL. A finding that is not a defect is explained where it is, as Security scanning does for the ones there now.

  • Its commit messages say what changed and why it matters, in a sentence.

CI runs all of this on every pull request, and a maintainer reviews it before it is merged.

The Contributor License Agreement

Signari is released under AGPL-3.0-only, and its copyright holder also offers it under other terms, which Licensing explains. That is only possible while the copyright stays in one place, so a first contribution asks you to sign the Contributor License Agreement before it is merged. The CLA Assistant bot comments on your first pull request with a link to it, and you sign by replying with exactly:

TextI have read the CLA Document and I hereby sign the CLA

The agreement says what it grants, so read it before you sign. It covers your later pull requests too.

Conduct

Be direct about the code and kind to the people. Disagreement about a change belongs in its pull request or issue, argued from what the change does. The code of conduct says what is not accepted and how to report it.