Skip to content

Commit 4eb59ff

Browse files
committed
docs(readme, contributing, issue template, PR template): Added Issue template, PR template, updated
1 parent 41fd3fb commit 4eb59ff

File tree

6 files changed

+316
-36
lines changed

6 files changed

+316
-36
lines changed

.github/contributing.md

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
Submitting Issues
2+
=================
3+
4+
If you are submitting a bug, please create a [jsfiddle](http://jsfiddle.net/) demonstrating the issue.
5+
6+
Contributing code
7+
=================
8+
9+
To contribute, fork the library and install gulp and dependencies. You need [node](http://nodejs.org/); use [nvm](https://github.com/creationix/nvm) or [nenv](https://github.com/ryuone/nenv) to install it.
10+
11+
```shell
12+
git clone https://github.com/dalelotts/angular-bootstrap-datetimepicker.git
13+
cd angular-bootstrap-datetimepicker
14+
npm install
15+
git checkout -b my-fix-branch develop # all patches against develop branch, please!
16+
npm test # this runs lint, complexity checks, and unit tests.
17+
```
18+
19+
Very important notes
20+
====================
21+
22+
* **Pull pull requests to the `master` branch will be closed.** Please submit all pull requests to the `develop` branch.
23+
* **Pull requests will not be merged without unit tests.**
24+
* **Do not include the minified files in your pull request.**
25+
* **Have good tests. If you don't have tests for every line and branch in your changes, I won't accept the PR.
26+
* **If your PR fails the CI build, I won't look at it.
27+
28+
Gulp tasks
29+
===========
30+
31+
We use Gulp for managing the build. Here are some useful Gulp tasks:
32+
33+
* `npm test` Runs all tests (webpack, commonjs, etc) checks the coding style, lints the code, calculates complexity, runs all tests, and enforces code coverage. You should make sure you do this before submitting a PR.
34+
* `gulp` The default task checks the coding style, lints the code, calculates complexity, runs the tests (not webpack or commonJS tests), and enforces code coverage.
35+
* `gulp scss` Generates the css file from the source scss.
36+
* `gulp css-lint` Lint the css files after generating.
37+
* `gulp templatecache` Generates src/js/datetimepicker.templates.js. You must re-add the IIFE around the generated code after it is generated (PR to fix this would be apprecaited)
38+
39+
# Contributing to AngularJS
40+
41+
We'd love for you to contribute to our source code and to make AngularJS even better than it is
42+
today! Here are the guidelines we'd like you to follow:
43+
44+
- [Question or Problem?](#question)
45+
- [Issues and Bugs](#issue)
46+
- [Feature Requests](#feature)
47+
- [Submission Guidelines](#submit)
48+
- [Coding Rules](#rules)
49+
- [Commit Message Guidelines](#commit)
50+
- [Signing the CLA](#cla)
51+
- [Further Info](#info)
52+
53+
## <a name="question"></a> Got a Question or Problem?
54+
55+
If you have questions about how to use angular-bootstrap-datetimepicker, please direct these to the [Gitter Chat Group][gitter].
56+
57+
## <a name="issue"></a> Found an Issue?
58+
59+
If you find a bug in the source code or a mistake in the documentation, you can help us by
60+
submitting an issue to our [GitHub Repository][issues]. Even better you can submit a Pull Request
61+
with a fix.
62+
63+
**Localization Issues:** This directive uses the [Moment][momentI18N] for all localization.
64+
This means that any localization issues should be reproted to Moment.
65+
66+
**Please see the [Submission Guidelines](#submit) below.**
67+
68+
## <a name="feature"></a> Want a Feature?
69+
70+
You can request a new feature by submitting an issue to our [GitHub Repository][github]. If you
71+
would like to implement a new feature then consider what kind of change it is:
72+
73+
* **Major Changes** that you wish to contribute to the project should be discussed first on [Gitter Chat][gitter]
74+
so that we can better coordinate our efforts, prevent duplication of work, and help you to craft the
75+
change so that it is successfully accepted into the project.
76+
* **Small Changes** can be crafted and submitted to the [GitHub Repository][github] as a Pull
77+
Request.
78+
79+
80+
## <a name="docs"></a> Want a Doc Fix?
81+
82+
If you want to help improve the docs, submit a PR.
83+
84+
When naming the commit, it is advised to follow the commit message
85+
guidelines below, by starting the commit message with **docs** and
86+
reference the filename and follows the **[Commit Message Guidelines](#commit)** outlined below.
87+
88+
## <a name="submit"></a> Submission Guidelines
89+
90+
### Submitting an Issue
91+
Before you submit your issue search the archive, maybe your question was already answered.
92+
93+
If your issue appears to be a bug, and hasn't been reported, open a new issue. Help us to maximize
94+
the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.
95+
Providing the following information will increase the chances of your issue being dealt with
96+
quickly:
97+
98+
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
99+
* **Motivation for or Use Case** - explain why this is a bug for you
100+
* **Angular Version(s)** - is it a regression?
101+
* **Browsers and Operating System** - is this a problem with all browsers or only specific ones?
102+
* **Reproduce the Error** - provide a live example (using [Plunker][plunker] or
103+
[JSFiddle][jsfiddle]) or an unambiguous set of steps.
104+
* **Related Issues** - has a similar issue been reported before?
105+
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
106+
causing the problem (line of code or commit)
107+
108+
Here is a great example of a well defined issue: https://github.com/angular/angular.js/issues/5069
109+
110+
**If you get help, help others. Good karma rulez!**
111+
112+
### Submitting a Pull Request
113+
Before you submit your pull request consider the following guidelines:
114+
115+
* Search [GitHub][pulls] for an open or closed Pull Request
116+
that relates to your submission. You don't want to duplicate effort.
117+
* Make your changes in a new git branch:
118+
119+
```shell
120+
git checkout -b my-fix-branch master
121+
```
122+
123+
* Create your patch, **including appropriate test cases**.
124+
* Run the full test suite, `npm test`, and ensure that all tests pass.
125+
* Commit your changes using a descriptive commit message that follows our
126+
[commit message conventions](#commit). Adherence to the [commit message conventions](#commit) is required,
127+
because release notes are automatically generated from these messages.
128+
129+
```shell
130+
git commit -a
131+
```
132+
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
133+
134+
* Build your changes locally to ensure all the tests pass:
135+
136+
```shell
137+
npm test
138+
```
139+
140+
* Push your branch to your fork on GitHub:
141+
142+
```shell
143+
git push origin my-fix-branch
144+
```
145+
146+
In GitHub, send a pull request to `angular-bootstrap-datetimepicker:develop`.
147+
If we suggest changes, then:
148+
149+
* Make the required updates.
150+
* Re-run the test suite to ensure tests are still passing.
151+
* Commit your changes to your branch (e.g. `my-fix-branch`).
152+
* Push the changes to your GitHub repository (this will update your Pull Request).
153+
154+
If the PR gets too outdated we may ask you to rebase and force push to update the PR:
155+
156+
```shell
157+
git rebase master -i
158+
git push origin my-fix-branch -f
159+
```
160+
161+
_WARNING: Squashing or reverting commits and force-pushing thereafter may remove GitHub comments
162+
on code that were previously made by you or others in your commits. Avoid any form of rebasing
163+
unless necessary._
164+
165+
That's it! Thank you for your contribution!
166+
167+
#### After your pull request is merged
168+
169+
After your pull request is merged, you can safely delete your branch and pull the changes
170+
from the main (upstream) repository:
171+
172+
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
173+
174+
```shell
175+
git push origin --delete my-fix-branch
176+
```
177+
178+
* Check out the master branch:
179+
180+
```shell
181+
git checkout master -f
182+
```
183+
184+
* Delete the local branch:
185+
186+
```shell
187+
git branch -D my-fix-branch
188+
```
189+
190+
* Update your master with the latest upstream version:
191+
192+
```shell
193+
git pull --ff upstream master
194+
```
195+
196+
## <a name="rules"></a> Coding Rules
197+
198+
To ensure consistency throughout the source code, keep these rules in mind as you are working:
199+
200+
* All features or bug fixes **must be tested** by one or more test.
201+
202+
## <a name="commit"></a> Git Commit Guidelines
203+
204+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
205+
readable messages** that are easy to follow when looking through the **project history**. But also,
206+
we use the git commit messages to **generate the AngularJS change log**.
207+
208+
The commit message formatting can be added using a typical git workflow or through the use of a CLI wizard ([Commitizen](https://github.com/commitizen/cz-cli)). To use the wizard, run `npm run commit` in your terminal after staging your changes in git.
209+
210+
### Commit Message Format
211+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
212+
format that includes a **type**, a **scope** and a **subject**:
213+
214+
```
215+
<type>(<scope>): <subject>
216+
<BLANK LINE>
217+
<body>
218+
<BLANK LINE>
219+
<footer>
220+
```
221+
222+
The **header** is mandatory and the **scope** of the header is optional.
223+
224+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
225+
to read on GitHub as well as in various git tools.
226+
227+
### Revert
228+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
229+
230+
### Type
231+
Must be one of the following:
232+
233+
* **feat**: A new feature
234+
* **fix**: A bug fix
235+
* **docs**: Documentation only changes
236+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
237+
semi-colons, etc)
238+
* **refactor**: A code change that neither fixes a bug nor adds a feature
239+
* **perf**: A code change that improves performance
240+
* **test**: Adding missing tests
241+
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
242+
generation
243+
244+
### Scope
245+
The scope could be anything specifying place of the commit change. For example `DateObject`,
246+
`configuration`, `yearView`, `monthView`, `dayView`, `hourVuew`, `minuteView`, `templates`, etc...
247+
248+
### Subject
249+
The subject contains succinct description of the change:
250+
251+
* use the imperative, present tense: "change" not "changed" nor "changes"
252+
* don't capitalize first letter
253+
* no dot (.) at the end
254+
255+
### Body
256+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
257+
The body should include the motivation for the change and contrast this with previous behavior.
258+
259+
### Footer
260+
The footer should contain any information about **Breaking Changes** and is also the place to
261+
reference GitHub issues that this commit **Closes**.
262+
263+
**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.
264+
265+
266+
[github]: https://github.com/dalelotts/angular-bootstrap-datetimepicker
267+
[gitter]: https://gitter.im/dalelotts/angular-bootstrap-datetimepicker
268+
[issues]: https://github.com/dalelotts/angular-bootstrap-datetimepicker/issues
269+
[pulls]: https://github.com/dalelotts/angular-bootstrap-datetimepicker/pulls
270+
[momentI18N]: http://momentjs.com/docs/#/i18n/
271+
272+
[jsfiddle]: http://jsfiddle.net/
273+
[plunker]: http://plnkr.co/edit
274+
[unit-testing]: https://docs.angularjs.org/guide/unit-testing

.github/issue_template.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
### Bug Reports
2+
You MUST have a JSBin recreation, or else your issue will be CLOSED without explanation.
3+
Instructions: http://fullcalendar.io/wiki/Reporting-Bugs/
4+
5+
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
6+
* **Motivation for or Use Case** - explain why this is a bug for you
7+
* **angular-bootstrap-datetimepicker Version(s)** - is it a regression?
8+
* **Browsers and Operating System** - is this a problem with all browsers or only specific ones?
9+
* **Link to a live example** - provide a live example (using JSBin, Plunker or JSFiddle.
10+
* **Related Issues** - has a similar issue been reported before?
11+
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
12+
causing the problem (line of code or commit)
13+
14+
### Feature Requests
15+
Search the issue tracker for an existing ticket before creating a new one.
16+
Instructions: http://fullcalendar.io/wiki/Requesting-Features/
17+
18+
(Please erase the above text and begin typing. Thanks!)

.github/pull_request_template.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
**What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)**
2+
3+
4+
5+
**What is the current behavior? (You can also link to an open issue here)**
6+
7+
8+
9+
**What is the new behavior (if this is a feature change)?**
10+
11+
12+
13+
**Does this PR introduce a breaking change?**
14+
15+
16+
17+
**Please check if the PR fulfills these requirements**
18+
- [ ] The commit message follows our guidelines: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format
19+
- [ ] Tests for the changes have been added (for bug fixes / features)
20+
- [ ] Docs have been added / updated (for bug fixes / features)
21+
22+
**Other information**:

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cache:
66
notifications:
77
email: false
88
node_js:
9-
- '5'
9+
- '6'
1010
before_install:
1111
- export DISPLAY=:99.0
1212
- sh -e /etc/init.d/xvfb start

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Angular bootstrap date & time picker version: 0.4.0
1+
# Angular bootstrap date & time picker
22

33
Native AngularJS datetime picker directive styled by Twitter Bootstrap 3
44

contributing.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)