2018-07-11 13:34:29 +03:00
# Contributing to Hasura graphql-engine
2018-07-11 07:57:03 +03:00
2018-10-19 19:59:18 +03:00
*First*: if you're unsure or afraid of anything, just ask, or submit the issue or
2018-07-11 13:34:29 +03:00
pull request anyway. 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
2018-10-19 19:59:18 +03:00
appreciate any contributions, and we don't want a wall of rules to get in
2018-07-11 13:34:29 +03:00
the way of that.
2018-11-06 15:39:53 +03:00
However, for those individuals who want a bit more guidance on the best way to
2018-07-11 13:34:29 +03:00
contribute to the project, read on. This document will cover what we're looking
2018-10-19 19:59:18 +03:00
for. By addressing all the points we're looking for, the chances that we
can quickly merge or address your contributions will increase.
2018-07-11 13:34:29 +03:00
## Overview
[hasura/graphql-engine ](https://github.com/hasura/graphql-engine ) is a mono-repo
2018-10-29 07:14:15 +03:00
consisting of 3 components. Each has their own contributing guides:
2018-07-11 07:57:03 +03:00
1. [Server (Haskell) ](server/CONTRIBUTING.md )
2. [CLI (Go) ](cli/CONTRIBUTING.md )
2018-09-27 14:40:32 +03:00
3. [Console (JavaScript) ](console/README.md#contributing-to-hasura-console )
2018-07-11 07:57:03 +03:00
2018-07-11 13:34:29 +03:00
All of the three components have a single version, denoted by either the git
2018-10-04 17:25:46 +03:00
tag or a combination of branch name and git commit SHA.
2018-07-11 13:34:29 +03:00
2018-10-27 12:58:12 +03:00
For all contributions, a CLA (Contributor License Agreement) needs to be signed [here ](https://cla-assistant.io/hasura/graphql-engine ) before (or after) the pull request has been submitted. A bot will prompt contributors to sign the CLA via a pull request comment, if necessary.
2018-10-01 20:09:18 +03:00
2018-09-13 09:30:07 +03:00
### Docs
Contributing guide for docs can be found at [docs/CONTRIBUTING.md ](docs/CONTRIBUTING.md ).
### Community content
There is no specific contributing guide for community content. Anything that can
help GraphQL Engine community/users can go into the section. We have identified
[boilerplates ](community/boilerplates ), [examples ](community/examples ) and
[tools ](community/tools ) as primary candidates. Feel free to submit a pull
request if you have something to add (not necessarily belonging to the
2018-10-19 19:59:18 +03:00
aforementioned sections).
2018-09-13 09:30:07 +03:00
2018-07-11 13:34:29 +03:00
## Issues
### Reporting an Issue
2018-11-06 15:39:53 +03:00
- Make sure you test against the latest released version. It is possible that we
may have already fixed the bug you're experiencing.
2018-07-11 13:34:29 +03:00
- Provide steps to reproduce the issue, including Postgres version,
2018-10-19 19:59:18 +03:00
graphql-engine version and the provider you are running on (Heroku, Docker,
2018-07-11 13:34:29 +03:00
etc.).
- Please include logs of the server, if relevant.
2018-07-11 07:57:03 +03:00
## Common guidelines
2018-07-11 13:34:29 +03:00
- Please make sure there is an issue associated with the work that you're doing.
- If you're working on an issue, please comment that you are doing so to prevent
duplicate work by others also.
- Squash your commits and refer to the issue using `fix #<issue-no>` or `close
#< issue-no > ` in the commit message, at the end.
For example: `resolve answers to everything (fix #42)` or `resolve answers to everything, fix #42`
2018-10-04 17:25:46 +03:00
- Rebase master with your branch before submitting a pull request.
2018-07-20 22:05:51 +03:00
2018-07-11 13:34:29 +03:00
## Commit messages
2018-10-19 19:59:18 +03:00
- The first line should be a summary of the changes, not exceeding 50
characters, followed by an optional body which has more details about the
changes. Refer [to this link ](https://github.com/erlang/otp/wiki/writing-good-commit-messages )
for more information on writing good commit messages.
2018-07-11 13:34:29 +03:00
2018-10-19 19:59:18 +03:00
- Use the imperative present tense: "add/fix/change", not "added/fixed/changed" nor "adds/fixes/changes".
2018-07-11 13:34:29 +03:00
2018-10-19 19:59:18 +03:00
- Don't capitalize the first letter of the summary line.
2018-07-11 13:34:29 +03:00
2018-10-19 19:59:18 +03:00
- Don't add a period/dot (.) at the end of the summary line.
2018-07-11 13:34:29 +03:00
(Credits: Some sections are adapted from https://github.com/PostgREST/postgrest/blob/master/.github/CONTRIBUTING.md)