CONTRIBUTING.md 2.21 KB
Newer Older
1
# How to contribute
Guillaume Lebigot's avatar
Guillaume Lebigot committed
2

3
Every good will is welcome.
Guillaume Lebigot's avatar
Guillaume Lebigot committed
4

5
To see how you can help, check :
Guillaume Lebigot's avatar
Guillaume Lebigot committed
6

7
- [Documentation](http://docs.karaokes.moe)
8
- [Create an issue or try to resolve one!](https://lab.shelter.moe/karaokemugen/karaokemugen-app/issues)
9
- [Come to our Discord!](https://karaokes.moe/discord)
10

Guillaume Lebigot's avatar
Guillaume Lebigot committed
11 12
Please read the following before contributing :

13 14 15 16 17 18 19 20 21
## Branches

When trying to work on a new feature or issue, remember there are two main branches to base your new branch/work off :

- `master` should be used when fixing bugs in the currently running version of Karaoke Mugen. Your fix will be included in the next "bugfix" release.
- `next` should be used when adding new features or fixing non-urgent bugs.

`master` is regularly merged within `next` when we make bugfixes on it. `next` is merged back on `master` only when doing major release versions.

22 23 24 25 26 27
So if you want to work  on a new feature for example, create a branch from `next`.

## Coding

Please respect coding conventions already in place as much as possible.

Guillaume Lebigot's avatar
Guillaume Lebigot committed
28 29
- Use of async/await instead of .then/.catch and callbacks
- Use `for..of` or `for..in` loops instead of `.forEach` unless your forEach is not using async functions or is a oneliner
30 31 32
- Use TypeScript
- Use import module syntax, not the require one
- Before adding a dependency, ask on Discord if it should really be added. Who knows, someone might have an idea on how to avoid using it, or a better alternative.
Guillaume Lebigot's avatar
Guillaume Lebigot committed
33 34 35 36 37

## Workflow

### Issues approval

Guillaume Lebigot's avatar
Guillaume Lebigot committed
38
If an issue needs to be fixed, a milestone will be added to it by a maintainer. At this point anyone can take the issue and work on it.
Guillaume Lebigot's avatar
Guillaume Lebigot committed
39

40
If an issue is closed but has not been fixed and could be reopened, please add a comment to it and wait for a maintainer to reopen it.
Guillaume Lebigot's avatar
Guillaume Lebigot committed
41 42 43 44 45 46 47 48 49 50

### Working on an issue

When starting work on an issue, **DO NOT** use the "Create merge request" button as it'll create a new branch on `master` by default. **DO** use the arrow next to it to create your new branch from the `next` branch instead.

### Merging

Once your work is ready, remove the `WIP` label at the beginning of the merge request title and add a comment to tell maintainers this is ready to merge.

Maintainers will usually merge by squashing the commits inside the branch unless explicitely stated otherwise.