Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 2.85 KB

CONTRIBUTING.md

File metadata and controls

55 lines (39 loc) · 2.85 KB

Contributing to PostgREST

First: if you're unsure or afraid of anything, just ask or submit the issue or pull request anyways. You won't be yelled at for giving your best effort. The worst that can happen is that you'll be politely asked to change something. We appreciate any sort of contributions, and don't want a wall of rules to get in the way of that.

However, for those individuals who want a bit more guidance on the best way to contribute to the project, read on. This document will cover what we're looking for. By addressing all the points we're looking for, it raises the chances we can quickly merge or address your contributions.

Issues

For questions on how to use PostgREST, please use GitHub discussions.

Reporting an Issue

  • Make sure you test against the latest stable release and also against the latest nightly release. It is possible we already fixed the bug you're experiencing.

  • Provide steps to reproduce the issue, including your OS version and the specific database schema that you are using.

  • Please include SQL logs for issues involving runtime problems. To obtain logs first enable logging all statements, then find your logs.

  • If your database schema has changed while the PostgREST server is running, send the server a SIGUSR1 signal or restart it to ensure the schema cache is not stale. This sometimes fixes apparent bugs.

Code

We have a fully nix-based development environment with many tools for a smooth development workflow available. Check the development docs on how to set it up and use it.

Haskell Conventions

  • All contributions must pass the tests before being merged. When you create a pull request your code will automatically be tested.

  • All code must also pass hlint and stylish-haskell with no warnings. This helps enforce a uniform style for all committers. Continuous integration will check this as well on every pull request. There are useful tools in the nix-shell that help with checking this locally. You can run postgrest-check to do this manually but we recommend adding it to .git/hooks/pre-commit as nix-shell --run postgrest-check to automatically check this before doing a commit.

Running Tests

For instructions on running tests, see the development docs.