UNPKG

3.44 kBMarkdownView Raw
1Pull Requests
2-------------
3
4If you're thinking about making some changes, maybe fixing a bug, or adding a
5snazzy new feature, first, thank you. Contributions are very welcome. Things
6need to be manageable for the maintainers, however. So below you'll find **The
7fastest way to get your pull request merged in.** Some things, particularly how
8you set up your branches and work with git, are just suggestions, but pretty good
9ones.
10
111. **Create a remote to track the base jsdoc3/jsdoc repository**
12 This is just a convenience to make it easier to update your ```<tracking branch>```
13 (more on that shortly). You would execute something like:
14
15 git remote add base git://github.com/jsdoc3/jsdoc.git
16
17 Here 'base' is the name of the remote. Feel free to use whatever you want.
18
192. **Set up a tracking branch for the base repository**
20 We're gonna call this your ```<tracking branch>```. You will only ever update
21 this branch by pulling from the 'base' remote. (as opposed to 'origin')
22
23 git branch --track pullpost base/master
24 git checkout pullpost
25
26 Here 'pullpost' is the name of the branch. Fell free to use whatever you want.
27
283. **Create your change branch**
29 Once you are in ```<tracking branch>```, make sure it's up to date, then create
30 a branch for your changes off of that one.
31
32 git branch fix-for-issue-395
33 git checkout fix-for-issue-395
34
35 Here 'fix-for-issue-395' is the name of the branch. Feel free to use whatever
36 you want. We'll call this the ```<change branch>```. This is the branch that
37 you will eventually issue your pull request from.
38
39 The purpose of these first three steps is to make sure that your merge request
40 has a nice clean diff that only involves the changes related to your fix/feature.
41
424. **Make your changes**
43 On your ```<change branch>``` make any changes relevant to your fix/feature. Don't
44 group fixes for multiple unrelated issues or multiple unrelated features together.
45 Create a separate branch for each unrelated changeset. For instance, if you're
46 fixing a bug in the parser and adding some new UI to the default template, those
47 should be separate branches and merge requests.
48
495. **Add tests**
50 Add tests for your change. If you are submitting a bugfix, include a test that
51 verifies the existence of the bug along with your fix. If you are submitting
52 a new feature, include tests that verify proper feature function, if applicable.
53 See the readme in the 'test' directory for more information
54
556. **Commit and publish**
56 Commit your changes and publish your branch (or push it if it's already published)
57
587. **Issue your pull request**
59 On github.com, switch to your ```<change branch>``` and click the 'Pull Request'
60 button. Enter some meaningful information about the pull request. If it's a bugfix,
61 that doesn't already have an issue associated with it, provide some info on what
62 situations that bug occurs in and a sense of it's severity. If it does already have
63 an issue, make sure the include the hash and issue number (e.g. '#100') so github
64 links it.
65
66 If it's a feature, provide some context about the motivations behind the feature,
67 why it's important/useful/cool/necessary and what it does/how it works. Don't
68 worry about being too verbose. Folks will be much more amenable to reading through
69 your code if they know what its supposed to be about.
70
\No newline at end of file