Skip to content

Contribution Guidelines

Nikita Sirovskiy edited this page Dec 8, 2022 · 8 revisions

Before we start...

Hello and welcome to all the contributors ✌️ First of all, thank you very much for your help. I'm happy to have you onboard.

Below you can find some contribution guidelines related to the code style (yet to come), GitHub issues and PRs etc. These are needed to keep the code base and the repo itself clean, structured and of the same style.

Issues

Issues are tickets in the world of Jira. With issues we request a feature, report a bug or keep some other work related to Leafy to do. There are a couple of simple rules to know before open an issue.

Consider using one of the existing issue templates.

Title

The title must contain generic description of a feature to understand what's this is at a glance. Should be as small as possible.

If the feature (or the bug) is related to a particular screen/module (e.g. to the home screen, to the notes and so on) the title should start with the prefix Home:, Notes: etc.

Don't put strings like feat:, [FR], bug: etc. Labels are used for these needs.

Description

Everything needed to resolve the issue (the description, the screenshots/videos, steps-to-reproduce etc.) should be located in the issue description. Don't hesitate to discuss it in the comments, ask for an advice or help!

Labels

As said above under the title section, use labels to categorize an issue. The most frequently used labels are the feature and the bug ones.

Example, please!

#198 is a good example. It's marked with the feature label, has a Home: prefix in the title and the title itself is short and clear. There is no need to open the issue to get its context or its idea.

Pull Requests

A pull request only exists if it resolves an issue. By the idea, there should not be a PR w/o a related issue.

Title

The title of a PR must be equal to the title of the issue that it resolves.

Description

The description must start with Resolves #n where n — is the number of the issue that it resolves.

Labels

At the moment we don't use labels on PRs.

Branch

Create a branch for every issue to resolve (e.g. for each PR). Branch names must follow a couple of rules:

  • Must start with feature/ or bug/ if the issue is labeled with the feature or the bug label;
  • Must be created accordingly to the issue name. Example: for an issue titled Home: Something to resolve create a branch with the name home-something-to-resolve.

You can use this great service by SByteDev to generate the branch name. Just paste the title to the field and it will generate it for ya.

Target branch

Always target the develop branch.

Example, please!

The PR #191 is a good example. Its branch contains the feature prefix and is the same as the issue name, the description has the Resolve statement and the PR's title is correct.

PR Validation

We have a GitHub action to validate PRs. If a PR doesn't follow the described rules, the PR validation will fail. A PR with failed validation will most likely be rejected or at least there will be a request to apply the needed changes.

Requesting to not merge a PR

If you want to mark a PR as «unmergeable», add the label to the PR.