We love contributions from everyone. By participating in this project, you agree to abide by the code of conduct adopted by xFAANG.
We expect everyone to follow the code of conduct anywhere in xFAANG's project codebases, issue trackers, pull request comments, chatrooms, and mailing lists.
-
Choose a good issue to work on.
-
For bigger issues, discuss your solution with the community.
-
Fork the repo.
-
Make your change, write tests.
- Please write tests for your changes in behaviour in AskQL modules.
- Format code with Prettier.
- For commit message use Conventional Commits format with more commit types (see this Gist).
-
Push and create a PR
- For the PR message also use Conventional Commits format with more commit types (see this Gist).
- Mention which issue the PR is closing or fixing, e.g. 'Closes #10' (more info here)
Technical note: We squash-merge PRs.
You can find all the issues here:
https://github.com/xFAANG/askql/issues
If you have noticed a new bug or have your own idea on an enhancement, feel free to submit it there.
If you are a new contributor:
-
Filter issues by a label 'good first issue'.
This way you will see tasks that others thought are a good start. Don't be surprised that some of them relate to the parts of code you don't understand or wouldn't like to touch at all. This is completely normal. Just find a single issue you would like to work on and commit to it.
-
If you know how to tackle your chosen issue, that's great, work on it and create a commit and a PR with your change.
-
If you don't know how to start, it most probably means we should have written more pointers :) In such case, we need your help - your feedback!
-
Remember good practices with global gitignore file configuration. If you don't know how to configure global gitignore see this Gist. We recommend to exclude your local configuration files for your system and code editor.
So be brave and reach out to us, either by tagging one of the Core Developers by their username in your chosen issue or by writing on the Discord community.
We will be very very happy to help you start, and your feedback will improve the pointers for the future new contributors and make their start smoother.
For small issues you can just start your contribution straightaway.
The bigger the issue is, the more discussion might be needed. Please write on the page with your issue or, if more real-time conversation is needed, write on our Discord community and write just the summary on the issue page.
-
Fork the repo.
-
Clone the repo:
git clone https://{yourGithubUsername}@github.com/{yourGithubUsername}/askql.git
Don't forget to replace {yourGithubUsername} with your github username.
-
Install dependencies:
npm i
-
Build the project:
npm run build
-
Make sure the tests pass (and if they didn't, please submit an issue on Github :) )
npm test
This is one of the most time-consuming tasks in the process :)
-
Make sure your code works well and looks well too. Code is written once but read multiple times.
-
If your change alters the behavior of AskQL components, please please create tests for your change in one of the
__tests__
directories. Choose the directory or directories which reflect the best the nature of the change.In case of any doubts on tests, write on the Github page with your issue or on our Discord community.
-
Make sure all tests pass:
npm test
-
Make sure code conforms to the Prettier plugin settings in the project. Best, use a Prettier extension to your IDE to auto-format the code (e.g. for VS Code use Prettier - Code formatter).
-
Write a good commit message. We use Conventional Commits format with more commit types (see this Gist).
There are a few things to check before you commit:
-
Did you format your code correctly?
We are using Prettier to check code style. When you commit, git will validate whether your changes keep the style. Please reformat the code using Prettier before committing (when using VS Code we suggest installing Prettier - Code formatter extension and turning on autoformatting before save).
-
Did you write tests for your change?
We advise to try to write tests for every change of behavior in AskQL components.
-
Did you run all the tests?
Run
npm test
to check if all tests pass. Note that while your own tests may pass, your change might be breaking existing tests.
-
Push to your fork.
-
Submit a pull request.
When naming your pull request, please use the same format as for the commits: Conventional Commits with more commit types (see this Gist).
Mention which issue the PR is closing or fixing, e.g. 'Closes #10' (more info here).
-
Others will give constructive feedback.
This is a time for discussion and improvements. At this point you might need to make some necessary changes before your contribution gets approved. Generally, the better discussion you make before working on a (big) issue, the shorter this step should take.
-
After your pull request is approved, either it will be merged by the approver or you will merge it.
A technical note: Currently all commits in PR are squashed on merge (no action needed here).
The versioning scheme we use is SemVer.
Any contributions you make will be under the MIT Software License. In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.
You are always welcome to open an issue on AskQL Github issues.
If you need anything, write on our Discord community.
This document was based on Thoughtbot templates https://github.com/thoughtbot/templates