Skip to content

Commit 31517bf

Browse files
authoredJan 5, 2018
docs: contributing guides and isssue/pr templates (akveo#123)
1 parent 5224baa commit 31517bf

5 files changed

+376
-62
lines changed
 

‎.github/ISSUE_TEMPLATE.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!--
2+
We will close this issue if you don't provide the needed information.
3+
4+
Please remember, the github issues is __NOT__ for support requests and general questions. It is for bugs and feature requests only.
5+
Please read https://github.com/akveo/nebular/blob/master/CONTRIBUTING.md and search
6+
existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.
7+
-->
8+
9+
### Issue type
10+
11+
**I'm submitting a ...** (check one with "x")
12+
13+
* [ ] bug report
14+
* [ ] feature request
15+
16+
### Issue description
17+
18+
**Current behavior:**
19+
<!-- Describe how the bug manifests. -->
20+
21+
**Expected behavior:**
22+
<!-- Describe what the behavior would be without the bug. -->
23+
24+
**Steps to reproduce:**
25+
<!-- Please explain the steps required to duplicate the issue, especially if you are able to provide a sample application. -->
26+
27+
**Related code:**
28+
<!--
29+
If you are able to illustrate the bug or feature request with an example, please provide a sample application via one of the following means:
30+
31+
A sample application via GitHub
32+
33+
StackBlitz (https://stackblitz.com)
34+
35+
Plunker (http://plnkr.co/edit/cpeRJs?p=preview)
36+
37+
-->
38+
39+
```
40+
insert short code snippets here
41+
```
42+
43+
### Other information:
44+
45+
**npm, node, OS, Browser**
46+
```
47+
<!--
48+
Node, npm: `node --version` and `npm --version`
49+
OS: Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
50+
Browser: Chrome/Safari/Firefox/etc?
51+
-->
52+
```
53+
54+
**Angular, Nebular**
55+
```
56+
<!--
57+
Check your `package-lock.json` or locate a `package.json` in the `node_modules` folder.
58+
-->
59+
```

‎.github/PULL_REQUEST_TEMPLATE.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
### Please read and mark the following check list before creating a pull request:
2+
3+
- [] I read and followed the [CONTRIBUTING.md](https://github.com/akveo/nebular/blob/master/CONTRIBUTING.md) guide.
4+
- [] I read and followed the [New Feature Checklist](https://github.com/akveo/nebular/blob/master/DEV_DOCS.md#new-feature-checklist) guide.
5+
6+
#### Short description of what this resolves:

‎CODE_OF_CONDUCT.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of the Nebular project, and in the interest of fostering an open and welcoming community,
4+
we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
5+
6+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender,
7+
gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality or anything else.
8+
9+
Examples of unacceptable behavior by participants include:
10+
11+
* The use of sexualized language or imagery
12+
* Personal attacks
13+
* Trolling or insulting/derogatory comments
14+
* Public or private harassment
15+
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
16+
* Other unethical or unprofessional conduct.
17+
18+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues,
19+
and other contributions that are not aligned to this Code of Conduct.
20+
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project.
21+
Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
22+
23+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
24+
25+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
26+
27+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)

‎CONTRIBUTING.md

+222
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
# Contributing to Nebular
2+
3+
We would love for you to contribute to Nebular and help make it ever better together! :rocket:
4+
5+
- [Code of Conduct](#coc)
6+
- [Question or Problem?](#question)
7+
- [Issues and Bugs](#issue)
8+
- [Feature Requests](#feature)
9+
- [Submission Guidelines](#submit-pr)
10+
- [Coding Rules](#rules)
11+
- [Commit Message Guidelines](#commit)
12+
13+
## <a name="coc"></a> Code of Conduct
14+
Help us keep Nebular open and inclusive. Please read and follow our [Code of Conduct][coc].
15+
16+
## <a name="question"></a> Got a Question or Problem?
17+
18+
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][stackoverflow] where the questions should be tagged with tag `nebular`.
19+
20+
StackOverflow is a much better place to ask questions since:
21+
22+
- there are thousands of people willing to help on StackOverflow
23+
- questions and answers stay available for public viewing so your question / answer might help someone else
24+
- StackOverflow's voting system assures that the best answers are prominently visible.
25+
26+
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.
27+
28+
29+
## <a name="issue"></a> Found an Issue?
30+
If you find a bug in the source code or a mistake in the documentation, you can help us by
31+
[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Including an issue
32+
reproduction (via CodePen, JsBin, Plunkr, GitHub repo, etc.) is the absolute best way to help the team quickly
33+
diagnose the problem. Screenshots and error stack traces are also helpful.
34+
35+
Please follow this simple checklist before submitting:
36+
37+
* If you have a question about using Nebular, please ask on the [StackOverflow][stackoverflow].
38+
39+
* It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable.
40+
41+
* The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
42+
43+
* Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with "needs info" and receives no further replies from the author of the issue for more than 5 days, it will be closed.
44+
45+
* If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported][issues]. You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
46+
47+
* Next, [create a new issue](#submit-issue) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
48+
49+
## <a name="feature"></a> Want a Feature?
50+
You can *request* a new feature by [submitting an issue](#submit-issue) to our [GitHub
51+
Repository][github]. If you would like to *implement* a new feature, please submit an issue with
52+
a proposal for your work first, to be sure that we can use it.
53+
Please consider what kind of change it is:
54+
55+
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
56+
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
57+
and help you to craft the change so that it is successfully accepted into the project.
58+
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
59+
60+
### <a name="submit-issue"></a> Submitting an Issue
61+
Before you submit an issue, search the archive, maybe your question was already answered.
62+
63+
If your issue appears to be a bug, and hasn't been reported, open a new issue.
64+
Help us to maximize the effort we can spend fixing issues and adding new
65+
features by not reporting duplicate issues. Please make sure to fill out the populated issue form before submitting the issue.
66+
67+
You can file new issues by providing the information [here][new_issue].
68+
69+
70+
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
71+
Before you submit your Pull Request (PR) consider the following guidelines:
72+
73+
* Search [GitHub][pulls] for an open or closed PR
74+
that relates to your submission. You don't want to duplicate effort.
75+
* Make your changes in a new git branch:
76+
77+
```shell
78+
git checkout -b my-fix-branch master
79+
```
80+
* Read the [developer documentation][dev-doc].
81+
* Create your patch, **including appropriate test cases**.
82+
* Follow our [Coding Rules](#rules).
83+
* Test your changes with our supported browsers and screen readers.
84+
* Run `npm run release:validate`, as described in the [developer documentation][dev-doc],
85+
and ensure that all tests pass, linter & build has no errors.
86+
* Commit your changes using a descriptive commit message that follows our
87+
[commit message conventions](#commit). Adherence to these conventions
88+
is necessary because release notes are automatically generated from these messages.
89+
90+
```shell
91+
git commit -a
92+
```
93+
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
94+
95+
* Push your branch to GitHub:
96+
97+
```shell
98+
git push my-fork my-fix-branch
99+
```
100+
101+
* In GitHub, send a pull request to `nebular:master`.
102+
* If we suggest changes then:
103+
* Make the required updates.
104+
* Re-run `npm run release:validate` to ensure tests are still passing, linter & build has no errors.
105+
* Rebase your branch and force push to your GitHub repository (this will update your Pull
106+
Request):
107+
108+
```shell
109+
git rebase master -i
110+
git push -f
111+
```
112+
113+
That's it! Thank you for your contribution!
114+
115+
#### After your pull request is merged
116+
117+
After your pull request is merged, you can safely delete your branch and pull the changes
118+
from the main (upstream) repository:
119+
120+
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as
121+
follows:
122+
123+
```shell
124+
git push my-fork --delete my-fix-branch
125+
```
126+
127+
* Check out the master branch:
128+
129+
```shell
130+
git checkout master -f
131+
```
132+
133+
* Delete the local branch:
134+
135+
```shell
136+
git branch -D my-fix-branch
137+
```
138+
139+
* Update your master with the latest upstream version:
140+
141+
```shell
142+
git pull --ff upstream master
143+
```
144+
145+
## <a name="rules"></a> Coding Rules
146+
To ensure consistency throughout the source code, keep these rules in mind as you are working:
147+
148+
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
149+
* All public API methods **must be documented** following JsDoc notation.
150+
151+
## <a name="commit"></a> Commit Message Guidelines
152+
153+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
154+
readable messages** that are easy to follow when looking through the **project history**. But also,
155+
we use the git commit messages to **generate the Nebular change log**.
156+
157+
### Commit Message Format
158+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
159+
format that includes a **type**, a **scope** and a **subject**:
160+
161+
```
162+
<type>(<scope>): <subject>
163+
<BLANK LINE>
164+
<body>
165+
<BLANK LINE>
166+
<footer>
167+
```
168+
169+
The **header** is mandatory and the **scope** of the header is optional.
170+
171+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
172+
to read on GitHub as well as in various git tools.
173+
174+
### Revert
175+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of
176+
the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is
177+
the SHA of the commit being reverted.
178+
179+
### Type
180+
Must be one of the following:
181+
182+
* **feat**: A new feature
183+
* **fix**: A bug fix
184+
* **docs**: Documentation only changes
185+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
186+
semi-colons, etc)
187+
* **refactor**: A code change that neither fixes a bug nor adds a feature
188+
* **perf**: A code change that improves performance
189+
* **test**: Adding missing tests or correcting existing tests
190+
* **build**: Changes that affect the build system, CI configuration or external dependencies
191+
(example scopes: gulp, broccoli, npm)
192+
* **chore**: Other changes that don't modify `src` or `test` files
193+
194+
### Scope
195+
The scope could be anything specifying place of the commit change. For example
196+
`menu`, `sidebar`, etc.
197+
198+
### Subject
199+
The subject contains succinct description of the change:
200+
201+
* use the imperative, present tense: "change" not "changed" nor "changes"
202+
* don't capitalize first letter
203+
* no dot (.) at the end
204+
205+
### Body
206+
Optional. Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
207+
The body should include the motivation for the change and contrast this with previous behavior.
208+
209+
### Footer
210+
Optional. The footer should contain any information about **Breaking Changes** and is also the place to
211+
reference GitHub issues that this commit **Closes**.
212+
213+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
214+
The rest of the commit message is then used for this.
215+
216+
[coc]: CODE_OF_CONDUCT.md
217+
[dev-doc]: DEV_DOCS.md
218+
[github]: https://github.com/akveo/nebular
219+
[stackoverflow]: https://stackoverflow.com/questions/tagged/nebular
220+
[issues]: https://github.com/akveo/nebular/issues
221+
[new_issue]: https://github.com/akveo/nebular/issues/new
222+
[pulls]: https://github.com/akveo/nebular/pulls

0 commit comments

Comments
 (0)
Please sign in to comment.