UNPKG

6.38 kBMarkdownView Raw
1DalekJS has a few very specific guidelines in addition
2to some of the standard guidelines that Github and open
3source projects in general recommend. These guidelines
4are here to facilitate your contribution and streamline
5the process of getting the changes merged in and released.
6
7If you don't follow these guidelines, we'll still work
8with you to get the changes in. Any contribution you can
9make will help tremendously. Following these guidelines
10will help to streamline the pull request and change
11submission process.
12
13## Documentation Fixes
14
15If you notice any problems with any documentation, please
16fix it and we'll get it merged as soon as we can. For
17small things like typos and grammar (which we know I'm
18terrible with), just click the "Edit this file" button
19and send in the pull request for the fix. For larger
20changes and big swaths of documentation changes, a regular
21pull request as outlined below is more appropriate.
22
23## Pull Requests
24
25See [Github's documentation for pull requests](https://help.github.com/articles/using-pull-requests).
26
27Pull requests are by far the best way to contribute to
28DalekJS. Any time you can send us a pull request with
29the changes that you want, we will have an easier time
30seeing what you are trying to do. But a pull request in
31itself is not usually sufficient. There needs to be some
32context and purpose with it, and it should be done
33against specific branch.
34
35## General Submission Guidelines
36
37These guidelines are generally applicable whether or not
38you are submitting a bug or a pull request. Please try to
39include as much of this information as possible with any
40submission.
41
42### Version Numbers
43
44In order to best help out with bugs, we need to know the
45following information in your bug submission:
46
47* DalekJS version #
48* Operating System / version #
49* Browser and version #
50
51Including this information in a submission will help
52us to test the problem and ensure that the bug is
53both reproduced and corrected on the platforms / versions
54that you are having issues with.
55
56### Provide A Meaningful Description
57
58It doesn't matter how beautiful and "obvious" your fix is.
59We have 10,000,000,000 things floating around the project
60at any given moment and we will not immediately understand
61why you are making changes.
62
63Given that, it is very important to provide a meaningful
64description with your pull requests that alter any code.
65A good format for these descriptions will include three things:
66
671. Why: The problem you are facing (in as much detail as is
68necessary to describe the problem to someone who doesn't
69know anything about the system you're building)
70
712. What: A summary of the proposed solution
72
733. How: A description of how this solution solves the problem,
74in more detail than item #2
75
764. Any additional discussion on possible problems this might
77introduce, questions that you have related to the changes, etc.
78
79Without at least the first 2 items in this list, we won't
80have any clue why you're changing the code. The first thing
81we'll ask, then, is that you add that information.
82
83### Create A Topic Branch For Your Work
84
85The work you are doing for your pull request should not be
86done in the master branch of your forked repository. Create
87a topic branch for your work. This allows you to isolate
88the work you are doing from other changes that may be happening.
89
90Github is a smart system, too. If you submit a pull request
91from a topic branch and we ask you to fix something, pushing
92a change to your topic branch will automatically update the
93pull request.
94
95### Isolate Your Changes For The Pull Request
96
97See the previous item on creating a topic branch.
98
99If you don't use a topic branch, we may ask you to re-do your
100pull request on a topic branch. If your pull request contains
101commits or other changes that are not related to the pull
102request, we will ask you to re-do your pull request.
103
104### Branch from "wip" not "master"
105
106The "master" branch of the DalekJS repository is for
107production release code, and documentation updates only. Never
108create a pull request from the master branch. Always create
109a branch for your work from the "wip" branch. This will
110facilitate easier pull request management for the continuous
111work that is done in the dev branch.
112
113### Submit Specs With Your Pull Request
114
115Whenever possible, submit the specs (unit tests) that
116correspond to your pull request.
117
118I would rather see a pull request that is nothing but a
119failing spec, than see a large change made to the real
120code with no test to support the change.
121
122In fact...
123
124## Submit A Failing Spec If You Don't Know How To Fix The Problem
125
126If you are stuck in a scenario that fails in your app,
127but you don't know how to fix it, submit a failing spec
128to show the failing scenario. Follow the guidelines for
129pull request submission, but don't worry about fixing the
130problem. A failing spec to show that a problem exists is
131a very very very helpful pull request for us.
132
133We'll even accept a failing test pasted in to the ticket
134description instead of a pull request. That would at
135least get us started on creating the failing test in the code.
136
137## Don't Be A Troll
138
139It is very sad that we need to include this section of
140the contribution guidelines...
141
142If you are running in to a scenario with a problem, don't
143be a troll. Comment like "does DalekJS even have tests?"
144are not useful, funny or constructive. In fact, it may get
145you blocked and reported for abuse to Github.
146
147Submit a useful comment describing the scenario that is
148having an issue. Show us a failing test. Show us some
149code that is not behaving the way the documentation says
150it should. Be useful and work with us to fix the problem.
151
152We're all for criticism and tearing apart DalekJS for
153the problems it has. Do it in a constructive and helpful
154manner: "There isn't a test for this scenario. Here's a
155rough idea for one that shows the problem." Tell us why
156you don't like Marionette. Tell us that someone else is
157building something better and why that other thing fits
158your scenario and needs better than Marionette does. Just
159do it in a manner that allows us to learn from your
160experiences, instead of reacting to you being a troll
161(likely causing us to get defensive and miss an opportunity
162to learn something).
163
164-----------
165All credit for this goes to @derickbaily, he is not involved in this project anyhow,
166but made this nice piece up for backbone.marionette.