Skip to content

Commit 24483cf

Browse files
authored
docs(scully): add scully's CONTRIBUTING.md
1 parent 72c91e1 commit 24483cf

File tree

1 file changed

+214
-0
lines changed

1 file changed

+214
-0
lines changed

CONTRIBUTING.md

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
# Contributing to Scully
2+
3+
We would love for you to contribute to Scully and help make it even better than it is
4+
today! As a contributor, here are the guidelines we would like you to follow:
5+
6+
- [Code of Conduct](#coc)
7+
- [Question or Problem?](#question)
8+
- [Issues and Bugs](#issue)
9+
- [Feature Requests](#feature)
10+
- [Submission Guidelines](#submit)
11+
- [Coding Rules](#rules)
12+
- [Commit Message Guidelines](#commit)
13+
14+
## <a name="coc"></a> Code of Conduct
15+
Help us keep Scully open and inclusive. Please read and follow our [Code of Conduct][coc].
16+
17+
## <a name="question"></a> Got a Question or Problem?
18+
19+
Do 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 [Stack Overflow][stackoverflow]) where the questions should be tagged with tag `scully`.
20+
21+
Stack Overflow is a much better place to ask questions since:
22+
23+
- there are thousands of people willing to help on Stack Overflow
24+
- questions and answers stay available for public viewing so your question / answer might help someone else
25+
- Stack Overflow's voting system assures that the best answers are prominently visible.
26+
27+
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
28+
29+
If you would like to chat about the question in real-time, you can reach out via our gitter channel (Coming soon).
30+
31+
## <a name="issue"></a> Found a Bug?
32+
If you find a bug in the source code, you can help us by
33+
[submitting an issue][github-issue] to our [GitHub Repository][github]. Even better, you can
34+
[submit a Pull Request](#submit-pr) with a fix.
35+
36+
## <a name="feature"></a> Missing a Feature?
37+
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub
38+
Repository. If you would like to *implement* a new feature, please submit an issue with
39+
a proposal for your work first, to be sure that we can use it.
40+
Please consider what kind of change it is:
41+
42+
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
43+
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
44+
and help you to craft the change so that it is successfully accepted into the project.
45+
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
46+
47+
## <a name="submit"></a> Submission Guidelines
48+
49+
### <a name="submit-issue"></a> Submitting an Issue
50+
51+
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
52+
53+
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal reproduction. Having a minimal reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions.
54+
55+
A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are fixing the right problem.
56+
57+
We will be insisting on a minimal reproduction scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal reproduction. We understand that sometimes it might be hard to extract essential bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
58+
59+
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
60+
61+
You can file new issues by selecting from our [new issue templates][github-choose] and filling out the issue template.
62+
63+
64+
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
65+
Before you submit your Pull Request (PR) consider the following guidelines:
66+
67+
1. Search [GitHub](https://github.com/scullyio/scully/pulls) for an open or closed PR
68+
that relates to your submission. You don't want to duplicate effort.
69+
1. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add.
70+
Discussing the design up front helps to ensure that we're ready to accept your work.
71+
1. Fork the scullyio/scully repo.
72+
1. Make your changes in a new git branch:
73+
74+
```shell
75+
git checkout -b my-fix-branch master
76+
```
77+
78+
1. Create your patch, **including appropriate test cases**.
79+
80+
1. Commit your changes using a descriptive commit message that follows our
81+
[commit message conventions](#commit). Adherence to these conventions
82+
is necessary run the command `npm run commit`
83+
84+
1. Push your branch to GitHub:
85+
86+
```shell
87+
git push origin my-fix-branch
88+
```
89+
90+
1. In GitHub, send a pull request to `scully:master`.
91+
* If we suggest changes then:
92+
* Make the required updates.
93+
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
94+
95+
```shell
96+
git rebase master -i
97+
git push -f
98+
```
99+
100+
That's it! Thank you for your contribution!
101+
102+
#### After your pull request is merged
103+
104+
After your pull request is merged, you can safely delete your branch and pull the changes
105+
from the main (upstream) repository:
106+
107+
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
108+
109+
```shell
110+
git push origin --delete my-fix-branch
111+
```
112+
113+
* Check out the master branch:
114+
115+
```shell
116+
git checkout master -f
117+
```
118+
119+
* Delete the local branch:
120+
121+
```shell
122+
git branch -D my-fix-branch
123+
```
124+
125+
* Update your master with the latest upstream version:
126+
127+
```shell
128+
git pull --ff upstream master
129+
```
130+
131+
132+
## <a name="commit"></a> Commit Message Guidelines
133+
134+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
135+
readable messages** that are easy to follow when looking through the **project history**.
136+
137+
### Commit Message Format
138+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
139+
format that includes a **type**, a **scope** and a **subject**:
140+
141+
_The command `npm run commit` was previously configured to use all these rules_
142+
143+
```
144+
<type>(<scope>): <subject>
145+
<BLANK LINE>
146+
<body>
147+
<BLANK LINE>
148+
<footer>
149+
```
150+
151+
The **header** is mandatory and the **scope** of the header is optional.
152+
153+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
154+
to read on GitHub as well as in various git tools.
155+
156+
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
157+
158+
Samples from Angular Repository: (even more [samples](https://github.com/angular/angular/commits/master))
159+
160+
```
161+
docs(changelog): update changelog to beta.5
162+
```
163+
```
164+
fix(release): need to depend on latest ng-lib
165+
166+
The version in our package.json gets copied to the one we publish, and users need the latest of these.
167+
```
168+
169+
### Type
170+
Must be one of the following:
171+
172+
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
173+
* **docs**: Documentation only changes
174+
* **feat**: A new feature
175+
* **fix**: A bug fix
176+
* **perf**: A code change that improves performance
177+
* **refactor**: A code change that neither fixes a bug nor adds a feature
178+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
179+
* **test**: Adding missing tests or correcting existing tests
180+
181+
### Scope
182+
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).
183+
184+
The following is the list of supported scopes:
185+
186+
* **scully**
187+
* **ng-lib**
188+
* **schematics**
189+
190+
191+
### Subject
192+
The subject contains a succinct description of the change:
193+
194+
* use the imperative, present tense: "change" not "changed" nor "changes"
195+
* don't capitalize the first letter
196+
* no dot (.) at the end
197+
198+
### Body
199+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
200+
The body should include the motivation for the change and contrast this with previous behavior.
201+
202+
### Footer
203+
The footer should contain any information about **Breaking Changes** and is also the place to
204+
reference GitHub issues that this commit **Closes**.
205+
206+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
207+
208+
209+
[coc]: https://github.com/scullyio/scully/blob/master/CODE_OF_CONDUCT.md
210+
[github]: https://github.com/scullyio/scully
211+
[github-issue]: https://github.com/scullyio/scully/issues/new?assignees=&labels=bug&template=---bug-report.md&title=
212+
[github-feature]: https://github.com/scullyio/scully/issues/new?assignees=&labels=enhancement&template=---feature-request.md&title=
213+
[github-choose]: https://github.com/scullyio/scully/issues/new/choose
214+
[stackoverflow]: http://stackoverflow.com/questions/tagged/scully

0 commit comments

Comments
 (0)