CONTRIBUTING.md 2.7 KB
Newer Older
J
J·Y 已提交
1
# How To Contribute
E
easyscheduler 已提交
2

J
John Liu 已提交
3
Start by forking the dolphinscheduler GitHub repository, make changes in a branch and then send a pull request.
E
easyscheduler 已提交
4

J
John Liu 已提交
5
## Set up your dolphinscheduler GitHub Repository
E
easyscheduler 已提交
6

J
John Liu 已提交
7
There are three branches in the remote repository currently:
J
J·Y 已提交
8

9 10 11 12 13
- `master` : normal delivery branch. After the stable version is released, the code for the stable version branch is merged into the master branch.

- `dev` : daily development branch. The daily development branch, the newly submitted code can pull requests to this branch.

- `x.x.x-release` : the stable release version.
E
easyscheduler 已提交
14

J
John Liu 已提交
15
So, you should fork the `dev` branch.
E
easyscheduler 已提交
16

K
Kirs 已提交
17
After forking the [dolphinscheduler upstream source repository](https://github.com/apache/dolphinscheduler/fork) to your personal repository, you can set your  personal development environment.
E
easyscheduler 已提交
18

J
John Liu 已提交
19
```sh
J
J·Y 已提交
20 21 22
cd <your work direcotry>
git clone <your personal forked dolphinscheduler repo>
cd dolphinscheduler
J
John Liu 已提交
23
```
E
easyscheduler 已提交
24

J
J·Y 已提交
25
## Set git remote as `upstream`
E
easyscheduler 已提交
26

J
John Liu 已提交
27
Add remote repository address, named upstream
E
easyscheduler 已提交
28

J
John Liu 已提交
29
```sh
K
Kirs 已提交
30
git remote add upstream https://github.com/apache/dolphinscheduler.git
J
John Liu 已提交
31
```
E
easyscheduler 已提交
32

J
John Liu 已提交
33
View repository:
E
easyscheduler 已提交
34

J
John Liu 已提交
35 36 37
```sh
git remote -v
```
E
easyscheduler 已提交
38

J
John Liu 已提交
39
There will be two repositories at this time: origin (your own warehouse) and upstream (remote repository)
E
easyscheduler 已提交
40

J
John Liu 已提交
41
Get/update remote repository code (already the latest code, skip it).
E
easyscheduler 已提交
42

J
John Liu 已提交
43 44
```sh
git fetch upstream
E
easyscheduler 已提交
45
```
J
John Liu 已提交
46 47 48 49

Synchronize remote repository code to local repository

```sh
E
easyscheduler 已提交
50 51 52 53
git checkout origin/dev
git merge --no-ff upstream/dev
```

J
J·Y 已提交
54
If remote branch has a new branch `dev-1.0`, you need to synchronize this branch to the local repository, then push to your own repository.
E
easyscheduler 已提交
55

J
J·Y 已提交
56
```sh
E
easyscheduler 已提交
57
git checkout -b dev-1.0 upstream/dev-1.0
58
git push --set-upstream origin dev-1.0
E
easyscheduler 已提交
59 60
```

J
John Liu 已提交
61
## Create your feature branch
J
J·Y 已提交
62

J
John Liu 已提交
63 64 65
Before making code changes, make sure you create a separate branch for them.

```sh
J
J·Y 已提交
66
git checkout -b <your-feature-branch> dev
J
John Liu 已提交
67 68 69
```

## Commit changes
J
J·Y 已提交
70

J
John Liu 已提交
71 72 73 74 75 76 77 78 79
After modifying the code locally, submit it to your own repository:

```sh
git commit -m 'information about your feature'
```

## Push to the branch

Push your locally committed changes to the remote origin (your fork).
E
easyscheduler 已提交
80

J
J·Y 已提交
81 82
```sh
git push origin <your-feature-branch>
J
John Liu 已提交
83 84 85
```

## Create a pull request
E
easyscheduler 已提交
86

J
John Liu 已提交
87
After submitting changes to your remote repository, you should click on the new pull request On the following github page.
E
easyscheduler 已提交
88 89

<p align = "center">
J
John Liu 已提交
90 91 92 93
<img src = "http://geek.analysys.cn/static/upload/221/2019-04-02/90f3abbf-70ef-4334-b8d6-9014c9cf4c7f.png" width ="60%"/>
</p>

Select the modified local branch and the branch to merge past to create a pull request.
E
easyscheduler 已提交
94 95

<p align = "center">
J
John Liu 已提交
96 97
<img src = "http://geek.analysys.cn/static/upload/221/2019-04-02/fe7eecfe-2720-4736-951b-b3387cf1ae41.png" width ="60%"/>
</p>
E
easyscheduler 已提交
98

J
John Liu 已提交
99
Next, the administrator is responsible for **merging** to complete the pull request.