-
Notifications
You must be signed in to change notification settings - Fork 19.8k
How to make a pull request
If you wish to make a pull request to the ECharts project, please read the following document.
- Read the Apache Code of Conduct
- (Optional) If you don't know which issues to fix, read Finding Easy Issues to Fix
- Leave a comment on the issue and tell us that you are going to look into the issue
- (Optional) If you wish to discuss the issue, read Discussion
- Before you start writing code, read Coding Standard
- Read How to Debug ECharts
- Name your branch for each issue
- Making changes (checkout Wiki How to debug?)
- (Optional) Add test cases
- Run test locally
- Commit your changes following Git Message Standard
- Push to remote and create a pull request
- Wait for the code review
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.
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.
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 lintto check the the code style.
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-xxxIf 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.
Checkout Wiki: How to debug?
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
<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
<type> part could be:
- pie/line/bar/...: Series names
- visualMap/logAxis/legend/...: Component names
- svg/ie/...: Environments
- ...
Fill in the templates when you create a pull request.