# Contributing Guidelines <!-- omit in toc -->

Thanks for taking the time to contribute! We would like the Astuto community to be a welcoming environment for both seasoned programmers and absolute beginners. The following guidelines should help you get started regardless of your skill level.

- [How to contribute](#how-to-contribute)
  - [Reporting bugs](#reporting-bugs)
  - [Proposing features](#proposing-features)
  - [Coding](#coding)
  - [Getting involved in the community](#getting-involved-in-the-community)
- [Styleguides](#styleguides)
  - [Git commit messages](#git-commit-messages)
  - [Coding conventions](#coding-conventions)
    - [General coding conventions](#general-coding-conventions)
    - [Ruby coding conventions](#ruby-coding-conventions)
    - [JavaScript coding conventions](#javascript-coding-conventions)
- [This is my first contribution! Help!!](#this-is-my-first-contribution-help)
  - [Workflow](#workflow)
  - [Look for label "good first issue"](#look-for-label-good-first-issue)
  - [Any doubt?](#any-doubt)
- [Community](#community)
  - [Code of Conduct](#code-of-conduct)
  - [Language](#language)
  - [Want to chat?](#want-to-chat)
- [Credits](#credits)

## How to contribute

There are various ways to contribute to Astuto. In this section we list the most common ones.

### Reporting bugs

[Open a new issue](https://github.com/riggraz/astuto/issues/new) on GitHub. In doing so, please follow these guidelines:

- Check whether this bug has been reported before in the [issues panel](https://github.com/riggraz/astuto/labels/bug). If that's the case, consider posting a comment to that already open issue, or react to a comment you agree with (for example, with the 👍 emoji). Otherwise, open a new issue.
- Choose a short, meaningful title
- Start the issue description with a quick summary of the problem you encountered
- Include steps to reproduce the issue
- State how you expected the program to behave, and how it actually behaved
- If applicable, write down stuff you tried to solve the problem that didn't work
- Feel free to include personal thoughts about why you think this issue is occurring

### Proposing features

As for bug reports, we use GitHub issues to track feature requests. So, if you want to propose a feature or enhancement, just [open a new issue](https://github.com/riggraz/astuto/issues/new). As always, check whether that feature has already been proposed before posting. If the issue is already there, just comment or add a reaction to express that you'd like this feature too.

### Coding

In order to contribute code, you should use the usual GitHub fork workflow. See [this section](#workflow) if you aren't comfortable with it yet.

The following is a list of some guidelines to take into consideration when contributing code:

- If you're going to fix a bug or implement a feature that has already been documented with an issue, please let the community know by posting a comment on that issue. In this way, we avoid the (unfortunate) possibility of two people working on the same thing at the same time.
- If you want to fix a bug or implement a new feature that hasn't already been documented with an issue, please [open an issue](https://github.com/riggraz/astuto/issues/new) before.
- Follow styleguides for both [commit messages](#git-commit-messages) and [code](#coding-conventions)
- When you're done, open a pull request and explain clearly what it is about. We also encourage you to link to the issue it fixes.

### Getting involved in the community

We'd love to hear your opinion both on small feature additions and on long-term strategic discussions. Indeed, you can contribute to Astuto just by dropping a comment to let us know your point of view.

In particular, some [issues](https://github.com/riggraz/astuto/issues?q=is%3Aissue+is%3Aopen+label%3Adiscussion) and [pull requests](https://github.com/riggraz/astuto/pulls?q=is%3Aopen+is%3Apr+label%3Adiscussion) are labeled "discussion". That label signifies that further discussion is required to move forward the development process: thus, we encourage you to express your opinion especially on these topics.

## Styleguides

### Git commit messages

```
Short summary of the commit

More throughout explaination of what the commit does and the reasoning behind it (optional)
```

For commit messages, please follow these broad guidelines:

- Separate subject from body with a blank line
- The subject must use present tense ("Add feature" not "Added feature") and imperative mood ("Fix bug" not "Fixes bug")
- Limit the subject to about 72 characters
- Try to be both coincise and clear

### Coding conventions

#### General coding conventions

- Write clean code
- We strongly encourage to write specs associated to the feature you're adding

#### Ruby coding conventions

TODO

#### JavaScript coding conventions

TODO

## This is my first contribution! Help!!

First off, we want to clarify that you don't need to be an expert or anything like that to contribute. There are [various ways](#how-to-contribute) in which you can contribute and we appreciate all kind contributions: huge ones as well as small ones, code contributions as well as documentation contributions.

Moreover, we understand that contributing to open source software may feel overwhelming at first (we've been there too!). But fear not, we're here to help you get started!

This section contains tips to help absolute beginners making their first contribution.

### Workflow

We follow the usual GitHub workflow for contributions:

1. [Open an issue](https://github.com/riggraz/astuto/issues/new) for the bug you're fixing or the feature you're developing, or, if the issue already exists, post a comment there
2. Fork this repository
3. Create a new branch in your forked repository
4. Code code code! (And test test test!)
5. When you're done, ensure that the test suite is running successfully
6. Submit a pull request against the master branch of this repository

If you are new to this workflow, we suggest you to deepen your knowledge by reading more about it, for example [this article](https://gist.github.com/Chaser324/ce0505fbed06b947d962).

### Look for label "good first issue"

You'll find some issues labeled with "good first issue". These are issues that are pretty easy to solve, so we recommend tackling one of them if this is the first time you contribute. You can find "good first issues" by going to the issues panel and apply a filter, or by [clicking here](https://github.com/riggraz/astuto/labels/good%20first%20issue).

### Any doubt?

If you still have any doubt, feel free to [join our Discord](https://discord.gg/jTAgJvT8) and drop a message!

## Community

### Code of Conduct

The project and everyone involved in it is governed by [our code of conduct](https://github.com/riggraz/astuto/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.

### Language

The development language is English. This means that comments, variable/function/etc. names, issues, pull requests, documentation, etc., must be written in English.

We also encourage to write in simple English, by avoiding difficult and complex terms, since not everyone in the community is a native English speaker.

### Want to chat?

If you want to reach out to ask something or just to have a chat, feel free to message us on [our Discord channel](https://discord.gg/jTAgJvT8). If you want to report a bug or propose a feature, please use GitHub issues instead.

## Credits

This document has been inspired by the following contribution guidelines:

- [Berty Contribution Guidelines](https://github.com/berty/community/blob/master/CONTRIBUTING.md)
- [Atom Contribution Guidelines](https://github.com/atom/atom/blob/master/CONTRIBUTING.md)

Commit message guidelines have been adapted from [Robert Painsi Commit Message Guidelines](https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53).