Skip to content

How to make a pull request

Ovilia edited this page Dec 23, 2019 · 14 revisions

If you wish to make a pull request to the ECharts project, please read the following document.

Steps of Making a Pull Request

First-time Contributors

  1. Read the Apache Code of Conduct
  2. (Optional) If you don't know which issues to fix, read Finding Easy Issues to Fix
  3. Leave a comment on the issue and tell us that you are going to look into the issue
  4. (Optional) If you wish to discuss the issue, read Discussion
  5. Before you start writing code, read Coding Standard
  6. Read How to Debug ECharts

Making a Pull Request

  1. Name your branch for each issue
  2. Making changes (checkout Wiki How to debug?)
  3. (Optional) Add test cases
  4. Run test locally
  5. Commit your changes following Git Message Standard
  6. Push to remote and create a pull request
  7. Wait for the code review

Finding Easy Issues to Fix

If you don't have an idea about which issue to fix, you may use difficulty: easy label to filter issues that we think is easier to fix. These are issues that should be fixed using less time than the average. So it's a good way for beginners to make a PR.

You may also filter with en label for English issues only.

Discussion

If you wish to have a discussion about the issue you are fixing or get some help from the committers, please comment in issues or pull requests or discuss it with us in the mailing list.

Coding Standard

Please follow the coding standard before you make any changes.

It is recommanded to install eslint plugin to in your IDE to find the invalid code style. Otherwise, we can also use

npm run lint

to check the the code style.

Name Your Branch

Fork ECharts project into your own project. Checkout a branch from master branch named fix-xxxx for each issue, where xxxx is the issue id related. If there's no related issue, you need to create one in most cases to describe what's wrong or what new feature is required.

git checkout master
git pull
git checkout -b fix-xxx

If you are a committer of the apache/incubator-echarts project, which means you have the write access to the project, you still need to push to a new branch (by git push origin HEAD:refs/heads/fix-xxxx) and use pull request to push your code. You cannot push code directly to master branch, otherwise it will be rejected by GitHub.

How to Debug ECharts

Checkout Wiki: How to debug?

Git Message Standard

Git commit messages are in the following format:

<type>(<scope>): <subject>. close #<issue_id>

In most cases, you need an issue to describe the pull request details and reference the issue number in PR commit message. If not, the close #<issue_id> part could be omitted.

A typical git message looks like:

feat(pie): provide two label layouts. close #1234

Types

<type> part must be 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

Scopes

<type> part could be:

  • pie/line/bar/...: Series names
  • visualMap/logAxis/legend/...: Component names
  • svg/ie/...: Environments
  • ...

Create a pull request

Fill in the templates when you create a pull request.

Clone this wiki locally