Skip to content

Latest commit

 

History

History
106 lines (79 loc) · 3.87 KB

CONTRIBUTING.md

File metadata and controls

106 lines (79 loc) · 3.87 KB

Guidelines

Some basic conventions for developers in this project.

General

Please make sure that there aren't existing pull requests attempting to address the issue mentioned. Likewise, please check for issues related to update, as someone else may be working on the issue in a branch or fork.

  • Please respect the coding style of Slackhell
  • Please open a discussion in a new issue / existing issue to talk about the changes you'd like to bring
  • Develop in a topic branch, not master/development

When creating a new branch, prefix it with the type of the change (see section Commit Message Format below), the associated opened issue number, a dash and some text describing the issue (using dash as a separator) and don't capitalize letter.

For example, if you work on a bugfix for the issue #221, you could name the branch fix221-topic-selection.

Commit Message Format

Each commit message should include a type and a subject:

 <type>: <subject>

Lines should not exceed 72 characters. This allows the message to be easier to read on github as well as in various git tools and produces a nice, neat commit log ie:

feat: add user info in the profile view
fix: fix a get table issue in the contract view
style: update description typo

Type

Must be one of the following:

  • feat: a new feature
  • Fix: a bug fix
  • doc: documentation only changes
  • style: changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: a code change that neither fixes a bug or adds a feature
  • test: adding missing tests
  • chore: changes to the build process or auxiliary tools and libraries such as documentation generation

Subject

The subject contains succinct description of the change:

  • Use the imperative, present tense: "change" not "changed" nor "changes"
  • Don't capitalize first type letter (e.g. fix:)
  • Don't capitalize first letter after type (e.g. fix: fix a get table issue in the contract view)
  • If the commit refers to an issue (see section References in commit messages below)
  • No period (.) at the end

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical.

Write your commit message in the imperative: "fix bug" and not "fixed
bug" or "fixes bug." This convention matches up with commit messages
generated by commands like git merge and git revert.

Further paragraphs come after blank lines.

- Bullet points are okay, too.
- Typically a hyphen or asterisk is used for the bullet, followed by a
  single space. Use a hanging indent.

Rules for a great git commit message style

  • Separate subject from body with a blank line
  • Do not end the subject line with a period (.)
  • Capitalize the body line on each paragraph
  • Use the imperative mood in the subject line
  • Wrap lines at 72 characters
  • Use the body to explain what and why you have done something. In most cases, you can leave out details about how a change has been made.

Information in commit messages

  • Describe why a change is being made.
  • How does it address the issue?
  • What effects does the patch have?
  • Do not assume the reviewer understands what the original problem was.
  • Do not assume the code is self-evident/self-documenting.
  • Read the commit message to see if it hints at improved code structure.
  • The first commit line is the most important.
  • Describe any limitations of the current code.
  • Do not include patch set-specific comments.

References in commit messages

If the commit refers to an issue, add this information to the commit message header or body. e.g. the GitHub web platform automatically converts issue ids (e.g. #123) to links referring to the related issue.

In subject header:

fix: [#123] refer to GitHub issue

In body:

…
Fixes [#123], [#124]