UNPKG

9.36 kBMarkdownView Raw
1# Contributing to Markdown-Editor
2
3> Thanks to the AngularJS team for the bulk of this text!
4
5We'd love for you to contribute to our source code and to make Markdown-Editor even better than it is today! Here are the guidelines we'd like you to follow:
6
7* [Code of Conduct][contribute.coc]
8* [Questions and Problems][contribute.question]
9* [Issues and Bugs][contribute.issue]
10* [Feature Requests][contribute.feature]
11* [Improving Documentation][contribute.docs]
12* [Issue Submission Guidelines][contribute.submit]
13* [Pull Request Submission Guidelines][contribute.submitpr]
14* [Signing the CLA][contribute.cla]
15
16## <a name="coc"></a> Code of Conduct
17
18Help us keep Markdown-Editor open and inclusive. Please read and follow our [Code of Conduct][coc].
19
20## <a name="requests"></a> Questions, Bugs, Features
21
22### <a name="question"></a> Got a Question or Problem?
23
24Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on dedicated support platforms, the best being the [Accord Project Slack][apslack]
25
26### <a name="issue"></a> Found an Issue or Bug?
27
28If you find a bug in the source code, you can help us by [submitting an issue][github-issues] to our GitHub Repository. Even better, you can submit a Pull Request with a fix.
29
30**Please see the **[**Submission Guidelines**][contribute.submit]** below.**
31
32### <a name="feature"></a> Missing a Feature?
33
34You can request a new feature by submitting an issue to our [GitHub Repository][github].
35
36If you would like to implement a new feature then consider what kind of change it is:
37
38* **Major Changes** that you wish to contribute to the project should be discussed first in an
39
40 [GitHub issue][github-issues] that clearly outlines the changes and benefits of the feature.
41
42* **Small Changes** can directly be crafted and submitted to the [GitHub Repository][github]
43
44 as a Pull Request. See the section about [Pull Request Submission Guidelines][contribute.submitpr], and
45
46 for detailed information read the [core development documentation][developers].
47
48### <a name="docs"></a> Want a Doc Fix?
49
50Should you have a suggestion for the documentation, you can open an issue and outline the problem or improvement you have - however, creating the doc fix yourself is much better!
51
52If you want to help improve the docs, it's a good idea to let others know what you're working on to minimize duplication of effort. Create a new issue \(or comment on a related existing one\) to let others know what you're working on.
53
54If you're making a small change \(typo, phrasing\) don't worry about filing an issue first. Use the friendly blue "Improve this doc" button at the top right of the doc page to fork the repository in-place and make a quick change on the fly. The commit message is preformatted to the right type and scope, so you only have to add the description.
55
56For large fixes, please build and test the documentation before submitting the PR to be sure you haven't accidentally introduced any layout or formatting issues. You should also make sure that your commit message follows the [**Commit Message Guidelines**][developers.commits].
57
58## <a name="submit"></a> Issue Submission Guidelines
59
60Before you submit your issue search the archive, maybe your question was already answered.
61
62If your issue appears to be a bug, and hasn't been reported, open a new issue. Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.
63
64The "[new issue][github-new-issue]" form contains a number of prompts that you should fill out to make it easier to understand and categorize the issue.
65
66**If you get help, help others. Good karma rulez!**
67
68## <a name="submit-pr"></a> Pull Request Submission Guidelines
69
70Before you submit your pull request consider the following guidelines:
71
72* Ensure there is an open [Issue][github-issues] for what you will be working on. If there is not, open one up by going through [these guidelines][contribute.submit].
73* Search for an open or closed [Pull Request][pulls] that relates to your submission. You don't want to duplicate effort.
74* Create the [development environment][developers.setup]
75* Make your changes in a new git branch:
76
77 ```text
78 git checkout -b name-issue-tracker-short-description master
79 ```
80
81 Name can be initials or GitHub username. An example of this could be:
82
83 ```text
84 git checkout -b irmerk-issue75-readme-typos master
85 ```
86
87* Create your patch commit, **including appropriate test cases**.
88* Follow our [Coding Rules][developers.rules].
89* Ensure you provide a DCO sign-off for your commits using the -s option of git commit. For more information see [how this works][dcohow].
90* If the changes affect public APIs, change or add relevant [documentation][developers.documentation].
91* Run the [unit test suite][developers.unit-tests], and ensure that all tests pass.
92
93* Commit your changes using a descriptive commit message that follows our [commit message conventions][developers.commits]. Adherence to the [commit message conventions][developers.commits] is required, because release notes are automatically generated from these messages.
94
95 ```text
96 git commit -a
97 ```
98
99 Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
100
101* Before creating the Pull Request, ensure your branch sits on top of master (as opposed to branch off a branch). This ensures the reviewer will need only minimal effort to integrate your work by fast-forwarding master:
102
103 ```text
104 git rebase upstream/master
105 ```
106
107* Last step before creating the Pull Request, package and run all tests a last time:
108
109 ```text
110 npm run test
111 ```
112
113* Push your branch to GitHub:
114
115 ```text
116 git push origin name-issue-tracker-short-description
117 ```
118
119* In GitHub, send a pull request to `markdown-editor:master` by following our [pull request conventions][developers.pullrequest]. This will trigger the check of the [Contributor License Agreement][contribute.cla] and the Travis integration.
120* If you find that the Travis integration has failed, look into the logs on Travis to find out if your changes caused test failures, the commit message was malformed etc. If you find that the tests failed or times out for unrelated reasons, you can ping a team member so that the build can be restarted.
121* If we suggest changes, then:
122 * Make the required updates.
123 * Re-run the test suite to ensure tests are still passing.
124 * Commit your changes to your branch \(e.g. `name-issue-tracker-short-description`\).
125 * Push the changes to your GitHub repository \(this will update your Pull Request\).
126
127 You can also amend the initial commits and force push them to the branch.
128
129 ```text
130 git rebase master -i
131 git push origin name-issue-tracker-short-description -f
132 ```
133
134 This is generally easier to follow, but separate commits are useful if the Pull Request contains iterations that might be interesting to see side-by-side.
135
136That's it! Thank you for your contribution!
137
138#### After your pull request is merged
139
140After your pull request is merged, you can safely delete your branch and pull the changes from the main \(upstream\) repository:
141
142* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
143
144 ```text
145 git push origin --delete name-issue-tracker-short-description
146 ```
147
148* Check out the master branch:
149
150 ```text
151 git checkout master -f
152 ```
153
154* Delete the local branch:
155
156 ```text
157 git branch -D name-issue-tracker-short-description
158 ```
159
160* Update your master with the latest upstream version:
161
162 ```text
163 git checkout master
164 git fetch --all --prune
165 git merge --ff-only upstream/master
166 git push origin master
167 ```
168
169## License <a name="license"></a>
170
171Accord Project source code files are made available under the [Apache License, Version 2.0][apache].
172
173Accord Project documentation files are made available under the [Creative Commons Attribution 4.0 International License][creativecommons] (CC-BY-4.0).
174
175[coc]: https://lfprojects.org/policies/code-of-conduct/
176[apslack]: https://accord-project-slack-signup.herokuapp.com
177
178[contribute.coc]: CONTRIBUTING.md#coc
179[contribute.cla]: CONTRIBUTING.md#cla
180[contribute.question]: CONTRIBUTING.md#question
181[contribute.issue]: CONTRIBUTING.md#issue
182[contribute.feature]: CONTRIBUTING.md#feature
183[contribute.docs]: CONTRIBUTING.md#docs
184[contribute.submit]: CONTRIBUTING.md#submit
185[contribute.submitpr]: CONTRIBUTING.md#submit-pr
186
187[developers]: DEVELOPERS.md
188[developers.commits]: DEVELOPERS.md#commits
189[developers.pullrequest]: DEVELOPERS.md#pullrequests
190[developers.documentation]: DEVELOPERS.md#documentation
191[developers.rules]: DEVELOPERS.md#rules
192[developers.setup]: DEVELOPERS.md#setup
193[developers.unit-tests]: DEVELOPERS.md#unit-tests
194
195[github-new-issue]: https://github.com/accordproject/markdown-editor/issues/new
196[github-issues]: https://github.com/accordproject/markdown-editor/issues
197[github]: https://github.com/accordproject/markdown-editor
198[pulls]: https://github.com/accordproject/markdown-editor/pulls
199
200[dcohow]: https://github.com/probot/dco#how-it-works
201[apache]: https://github.com/accordproject/markdown-editor/blob/master/LICENSE
202[creativecommons]: http://creativecommons.org/licenses/by/4.0/
203
\No newline at end of file