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:
You will need Node.js version 10+ and Yarn 1.x.
After cloning the repo, run:
$ yarn # install the dependencies of the projectA high level overview of tools used:
- TypeScript as the development language
- Jest for unit testing
- ESlint and Prettier for code formatting
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 -Wif 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 -Dif you want add packageB for packageA,
$ yarn workspace packageA add packageBlike Add Dependencies, use remove instead of add.
run this command:
$ yarn build
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.
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.
Header must be matched the following rules:
<type>(<scope>): <short summary>
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
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,testandrefactorchanges 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).
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
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.
if the pr contains the break change, the body should be BREAKING CHANGE: at the beginning.
The footer is optional and should be the place to
reference GitHub issues that this commit Closes.
If the commit leads to some bug, it prefer to use git revert.
git revert ${commit-id}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.
Please find the TODO list from Kanban board