Skip to content

Latest commit

 

History

History
175 lines (112 loc) · 5.43 KB

File metadata and controls

175 lines (112 loc) · 5.43 KB

Contributing to PowerBotKit Dev Framework

Hi! I'm really excited that you are interested in contributing to powerbot. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:

Development Setup

You will need Node.js version 10+ and Yarn 1.x.

Setup

After cloning the repo, run:

$ yarn # install the dependencies of the project

A high level overview of tools used:

Add Dependencies

we use Yarn Workspaces to bootstrap the project

if you want to add a develop dependency for root, use Typescript as example:

$ yarn add Typescript -D -W

if you want add a (develop) dependency for packageA, use lodash as example:

$ yarn workspace packageA add lodash -D  #if you want to add develop dependency, please add -D

if you want add packageB for packageA,

$ yarn workspace packageA add packageB

Remove Dependencies

like Add Dependencies, use remove instead of add.

Build

run this command:

$ yarn build

Commit Message Guidelines

This is adapted from Angular's commit convention.

We have very precise rules over how our Git commit message must be formatted. This format leads to easier to read commit history and build changelog file.

Commit Message Format

Each commit message should consists of a header, a body, and a footer.

<header>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

The header is mandatory and must conform to the Commit Message Header format.

The body is optional. When the body is required, it should be at least 20 characters long.

The footer is optional.

Commit Message Header

Header must be matched the following rules:

<type>(<scope>): <short summary>

Type

The type must be the one of the following:

  • *build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests
  • revert: Revert some code for some reason
  • chore: Changes that doesn't belong the above the type or fix conflict in merging code

Scope

The scope is optional and should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).

The following is the list of supported scopes:

  • core
  • consumer
  • distributor

There are currently a few exceptions to the "use package name" rule:

  • packaging: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
  • none/empty string: useful for style, test and refactor changes that are done across all packages (e.g. style: add missing semicolons) and for docs changes that are not related to a specific package (e.g. docs: fix typo in tutorial).

Short Summary

The short summary contains a succinct description of the change:

  • use the imperative, present tense: "change" not "changed" nor "changes"
  • don't capitalize the first letter

Commit Message Body

Just as in the short summary, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.

Break Change

if the pr contains the break change, the body should be BREAKING CHANGE: at the beginning.

Commit Message Footer

The footer is optional and should be the place to reference GitHub issues that this commit Closes.

Revert

If the commit leads to some bug, it prefer to use git revert.

git revert ${commit-id}

Project Structure

This repository employs a monorepo setup which hosts a number of associated packages under the packages directory:

  • core: powerbot core package. It provide the definition.

  • consumer: powerbot consumer package. It can manage worker to process message.

  • distributor: powerbot distributor package. It can distribute message to different channel and provide the api to return log.

TODO List

Please find the TODO list from Kanban board