forked from CorsixTH/CorsixTH
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCONTRIBUTING.txt
144 lines (110 loc) · 5.44 KB
/
CONTRIBUTING.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
TELL OTHER DEVS WHAT YOU ARE WORKING ON
When you start working on a fix/enhancement for an open issue please always
post a comment in this issue's discussion to tell other devs that you have
started working on it so that they won't waste any of their free time by
working on their own fix/enhancement for it.
If there isn't an open issue discussion for a bug fix/enhancement you want
to work on please check that there isn't a closed discussion for it because
a previous developer of it didn't finish their work which you could finish.
And if there is no existing issue discussion for what you want to work on
please open a new issue for it and tell other devs here that your going to/
have started working on it.
ISSUE REPORTING:
GitHub currently doesn't support automatic issue templates, so follow the
instructions below when you want to make a suggestion, bug report, or pull
request.
Please report only one bug, suggestion or pull request per issue,
BUG REPORT
Please answer the questions below when you want to report a bug. A bug could
be for example an error crash, graphical glitch or unexpected behavior. Please
copy the questions below to your issue and answer them when you want to report
a bug:
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of CorsixTH are you using (e.g. "0.30", "4c66e39985")?
What operating system / compile settings are you using?
What level was this on (e.g. "Demo level", "Full game level 12")?
Upload a saved game file (preferably an autosave from before the error) if you
have one and it is relevant. Look at HOW TO UPLOAD GAMELOG AND/OR SAVES for how
to do this.
If possible, also upload the gamelog. Look at HOW TO UPLOAD GAMELOG AND/OR
SAVES for how to do this.
Please provide any additional information below.
SUGGESTION
If you want to make a suggestion, please copy the following questions into
your issue and answer them:
What is it you would like in the game?
What version of the product are you using? On what operating system?
PULL REQUEST
When providing a pull request ensure the description field describes the major
changes from the request. If your pull request relates to any existing
issues, include those issues in the description. e.g. "Fixes issue #1"
HOW TO UPLOAD GAMELOG AND/OR SAVES
As GitHub currently only supports uploading of images, you will have to upload
your gamelog(.txt) and your savegames to an another source such as Google
Drive, Dropbox, or SkyDrive/OneDrive. Add the link to the file to your issue
and make the file(s) public, so we can access your gamelog or savegame. The
most important thing is to not remove these files after you uploaded them!
Also make sure you don't use a file hosting service which will automatically
delete your file after a time.
CONTRIBUTING CODE:
First Time
1. Ensure you have a GitHub account (https://github.com/signup/free)
2. Fork CorsixTH\CorsixTH (https://github.com/CorsixTH/CorsixTH/fork)
3. Ensure you have a git client. (http://windows.github.com or
http://mac.github.com)
4. Clone your fork to your computer
- If using github client, run Git Shell
- git clone https://github.com/mygithubuser/CorsixTH.git
5. Add upstream remote
- git remote add upstream https://github.com/CorsixTH/CorsixTH.git
Every Time
6. Sync your master branch with the CorisxTH repository's master branch
- git fetch upstream
- git rebase upstream/master
7. Make sure no one is already working on the issue you want to work on.
8. Tell other developers that you've started/will start working on this issue
by posting a comment in its existing issue discussion or if there's no existing
discussion for it then please open a new issue discussion for it and tell other
devs here that your working on it.
9. Create feature branch
- git branch myfeature upstream/master
10. Checkout your feature branch
- git checkout myfeature
11. Make your changes
12. Unittest continuously, see README.txt in CorsixTH/Luatest for more info
13. Review your changes
- git diff
(each file) - git add
- git diff --check
Check there's no white spaces.
- git commit
Write an informative commit message and save
14. Push your changes to your fork
- git push origin myfeature
15. Create a pull request
(https://github.com/mygithubuser/CorsixTH/compare/CorsixTH:master...myfeature)
Now watch to see if your feature is accepted.
Notes:
Multiple commits:
If your feature is very big, break it into subprojects and do a separate commit
for every independent operation. This means doing step 10 several times as you
go. You still only need to do one pull request at the end.
Syncing with Upstream:
If it takes a long time between when you start your feature and when you finish
there might be other important changes other people are making to CorsixTH. It
is a good idea to make sure your code will still operate correctly with the
latest changes. To do this:
- git fetch upstream
- git rebase upstream/master
What this does is downloads all the changes from CorsixTH\CorsixTH since you
started, and pretends that all your changes were made after them. If there are
conflicts, for example if someone else changed the same line in the same file
that you did you will be asked to resolve those conflicts.
If you follow these guidelines then you should be well on your way to producing
good pull requests.
If you need more help just ask the friendly people on
[email protected] or via IRC in #corsix-th on freenode.