Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit c0ea21f

Browse files
CaerusKaruThomasBurleson
authored andcommitted
chore: add CONTRIBUTING guidelines
1 parent 9f32c7b commit c0ea21f

File tree

1 file changed

+244
-0
lines changed

1 file changed

+244
-0
lines changed

CONTRIBUTING.md

Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
# Contributing to Angular Flex Layout
2+
3+
We would love for you to contribute to Angular Flex Layout and help make it ever better!
4+
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-pr)
11+
- [Coding Rules](#rules)
12+
- [Commit Message Guidelines](#commit)
13+
- [Signing the CLA](#cla)
14+
15+
## <a name="coc"></a> Code of Conduct
16+
Help us keep Angular open and inclusive. Please read and follow our [Code of Conduct][coc].
17+
18+
## <a name="question"></a> Got a Question or Problem?
19+
20+
Please 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 [StackOverflow](https://stackoverflow.com/questions/tagged/angular-flex-layout) where the questions should be tagged with tag `angular-flex-layout`.
21+
22+
StackOverflow is a much better place to ask questions since:
23+
24+
- there are thousands of people willing to help on StackOverflow
25+
- questions and answers stay available for public viewing so your question / answer might help someone else
26+
- StackOverflow's voting system assures that the best answers are prominently visible.
27+
28+
To save your and our time, we will be systematically closing all the issues that are requests for general support and redirecting people to StackOverflow.
29+
30+
If you would like to chat about the question in real-time, you can reach out via [our gitter channel][gitter].
31+
32+
## <a name="issue"></a> Found an Issue?
33+
If you find a bug in the source code or a mistake in the documentation, you can help us by
34+
[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Including an issue
35+
reproduction with StackBlitz IDE is the absolute best way to help the team quickly
36+
diagnose the problem. Screenshots are also helpful.
37+
38+
You can help the team even more and [submit a Pull Request](#submit-pr) with a fix.
39+
40+
## <a name="feature"></a> Want a Feature?
41+
You can *request* a new feature by [submitting an issue](#submit-issue) to our [GitHub
42+
Repository][github]. If you would like to *implement* a new feature, please submit an issue with
43+
a proposal for your work first, to be sure that we can use it.
44+
Please consider what kind of change it is:
45+
46+
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
47+
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
48+
and help you to craft the change so that it is successfully accepted into the project.
49+
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
50+
51+
### <a name="submit-issue"></a> Submitting an Issue
52+
Before you submit an issue, search the archive, maybe your question was already answered.
53+
54+
If your issue appears to be a bug, and hasn't been reported, open a new issue.
55+
Help us to maximize the effort we can spend fixing issues and adding new
56+
features by not reporting duplicate issues. Providing the following information will increase the
57+
chances of your issue being dealt with quickly:
58+
59+
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
60+
* **Angular and Flex Layout Versions** - which versions of Angular and Flex Layout are affected
61+
(e.g. 2.0.0-alpha.53)
62+
* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior
63+
is a bug for you
64+
* **Browsers and Operating System** - is this a problem with all browsers?
65+
* **Reproduce the Error** - provide a live example (using [StackBlitz IDE][stackblitz]) or a unambiguous set of steps
66+
* **Screenshots** - Due to the visual nature of Angular Flex Layout, screenshots can help the team
67+
triage issues far more quickly than a text description.
68+
* **Related Issues** - has a similar issue been reported before?
69+
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
70+
causing the problem (line of code or commit)
71+
72+
You can file new issues by providing the above information [here](https://github.com/angular/flex-layout/issues/new).
73+
74+
75+
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
76+
Before you submit your Pull Request (PR) consider the following guidelines:
77+
78+
* Search [GitHub](https://github.com/angular/flex-layout/pulls) for an open or closed PR
79+
that relates to your submission. You don't want to duplicate effort.
80+
* Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs.
81+
We cannot accept code without this.
82+
* Make your changes in a new git branch:
83+
84+
```shell
85+
git checkout -b my-fix-branch master
86+
```
87+
88+
* Create your patch, **including appropriate test cases**.
89+
* Follow our [Coding Rules](#rules).
90+
* Test your changes with our supported browsers and screen readers.
91+
* Run the full Angular Flex Layout test suite, and ensure that all tests pass.
92+
* Commit your changes using a descriptive commit message that follows our
93+
[commit message conventions](#commit). Adherence to these conventions
94+
is necessary because release notes are automatically generated from these messages.
95+
96+
```shell
97+
git commit -a
98+
```
99+
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
100+
101+
* Push your branch to GitHub:
102+
103+
```shell
104+
git push my-fork my-fix-branch
105+
```
106+
107+
* In GitHub, send a pull request to `flex-layout:master`.
108+
* If we suggest changes then:
109+
* Make the required updates.
110+
* Re-run the Angular Flex Layout test suites to ensure tests are still passing.
111+
* Rebase your branch and force push to your GitHub repository (this will update your Pull
112+
Request):
113+
114+
```shell
115+
git rebase master -i
116+
git push -f
117+
```
118+
119+
That's it! Thank you for your contribution!
120+
121+
#### After your pull request is merged
122+
123+
After your pull request is merged, you can safely delete your branch and pull the changes
124+
from the main (upstream) repository:
125+
126+
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as
127+
follows:
128+
129+
```shell
130+
git push my-fork --delete my-fix-branch
131+
```
132+
133+
* Check out the master branch:
134+
135+
```shell
136+
git checkout master -f
137+
```
138+
139+
* Delete the local branch:
140+
141+
```shell
142+
git branch -D my-fix-branch
143+
```
144+
145+
* Update your master with the latest upstream version:
146+
147+
```shell
148+
git pull --ff upstream master
149+
```
150+
151+
## <a name="rules"></a> Coding Rules
152+
To ensure consistency throughout the source code, keep these rules in mind as you are working:
153+
154+
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
155+
* All public API methods **must be documented**. (Details TBD).
156+
* We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
157+
**100 characters**.
158+
159+
## <a name="commit"></a> Commit Message Guidelines
160+
161+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
162+
readable messages** that are easy to follow when looking through the **project history**. But also,
163+
we use the git commit messages to **generate the Angular Flex Layout change log**.
164+
165+
### Commit Message Format
166+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
167+
format that includes a **type**, a **scope** and a **subject**:
168+
169+
```
170+
<type>(<scope>): <subject>
171+
<BLANK LINE>
172+
<body>
173+
<BLANK LINE>
174+
<footer>
175+
```
176+
177+
The **header** is mandatory and the **scope** of the header is optional.
178+
179+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
180+
to read on GitHub as well as in various git tools.
181+
182+
### Revert
183+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of
184+
the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is
185+
the SHA of the commit being reverted.
186+
187+
### Type
188+
Must be one of the following:
189+
190+
* **feat**: A new feature
191+
* **fix**: A bug fix
192+
* **docs**: Documentation only changes
193+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
194+
semi-colons, etc)
195+
* **refactor**: A code change that neither fixes a bug nor adds a feature
196+
* **perf**: A code change that improves performance
197+
* **test**: Adding missing tests or correcting existing tests
198+
* **build**: Changes that affect the build system, CI configuration or external dependencies
199+
(example scopes: gulp, broccoli, npm)
200+
* **chore**: Other changes that don't modify `src` or `test` files
201+
202+
### Scope
203+
The scope could be anything specifying place of the commit change. For example
204+
`datepicker`, `dialog`, etc.
205+
206+
### Subject
207+
The subject contains succinct description of the change:
208+
209+
* use the imperative, present tense: "change" not "changed" nor "changes"
210+
* don't capitalize first letter
211+
* no dot (.) at the end
212+
213+
### Body
214+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
215+
The body should include the motivation for the change and contrast this with previous behavior.
216+
217+
### Footer
218+
The footer should contain any information about **Breaking Changes** and is also the place to
219+
reference GitHub issues that this commit **Closes**.
220+
221+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
222+
The rest of the commit message is then used for this.
223+
224+
A detailed explanation can be found in this [document][commit-message-format].
225+
226+
## <a name="cla"></a> Signing the CLA
227+
228+
Please sign our Contributor License Agreement (CLA) before sending pull requests. For any code
229+
changes to be accepted, the CLA must be signed. It's a quick process, we promise!
230+
231+
* For individuals we have a [simple click-through form][individual-cla].
232+
* For corporations we'll need you to
233+
[print, sign and one of scan+email, fax or mail the form][corporate-cla].
234+
235+
236+
[coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
237+
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/preview
238+
[corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html
239+
[github]: https://github.com/angular/flex-layout
240+
[gitter]: https://gitter.im/angular/flex-layout
241+
[individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
242+
[js-style-guide]: https://google.github.io/styleguide/jsguide.html
243+
[stackblitz]: https://stackblitz.com/edit/angular-flex-layout-seed
244+
[stackoverflow]: http://stackoverflow.com/

0 commit comments

Comments
 (0)