-
Notifications
You must be signed in to change notification settings - Fork 566
How to Commit
Apache InLong uses GitHub's Pull Request (PR) to receive contributed code. This document will introduce the process of code commit in detail.
- InLong code base:https://github.com/apache/inlong
- InLong website base:https://github.com/apache/inlong-website
Can be an existing issue or your newly created issue, and record the Issue ID.
Open apache/inlong 's GitHub page, clicking on the fork button at the top right to fork.
git clone https://github.com/<your_github_name>/inlong.gitcd inlong
git remote add upstream https://github.com/apache/inlong.gitgit remote -v
origin https://github.com/<your_github_name>/inlong.git (fetch)
origin https://github.com/<your_github_name>/inlong.git(push)
upstream https://github.com/apache/inlong.git (fetch)
upstream https://github.com/apache/inlong.git (push)origin is its own fork repository, upstream is the official repository
git fetch upstream
git pull upstream masterGenerally, issue id is used as the branch name, such as: INLONG-XYZ.
git checkout -b INLONG-XYZMake sure that the branch
INLONG-XYZis checkout from the latest code of the official master branch.
After modifying the code, you can format it with the following command.
mvn spotless:check
mvn spotless:applyThe format of the commit message must be consistent with the issue title and start with [INLONG-XYZ][Component].
git commit -a -m "[INLONG-XYZ][Component] commit msg"
git push origin INLONG-XYZ
Componentshould be replaced by the InLong component name, like Manager, Sort, DataProxy...
https://github.com/<your_github_name>/inlongSwitch to committed branch INLONG-XYZ
Click New pull request or Compare & pull request
Considerations when opening a pull request:
- he title of PR must start with issue id, which is better consistent with the commit message
- To speed up the review, it is recommended to supplement the necessary information according to the submission template, such as modification motivation, implementation details, etc.
Enter the apache/inlong home page, and a pop-up window for Pull Request will appear, or you can directly click to create it.
Generally, the PR can be formally merged into the code base only after more than 2 PMC/Committer reply + 1.
Finally, congratulations on becoming an official contributor to InLong!