@@ -14,15 +14,136 @@ Test that Grunt's CLI and Bower are installed by running `grunt --version` and `
14141 . Fork and clone the repo.
15151 . Run ` npm install ` to install all build dependencies (including Grunt).
16161 . Run ` bower install ` to install the front-end dependencies.
17- 1 . Run ` grunt ` to grunt this project.
17+ 1 . Run ` grunt test ` to test this project.
1818
19- Assuming that you don't see any red, you're ready to go. Just be sure to run ` grunt ` after making any changes, to ensure that nothing is broken.
19+ Assuming that you don't see any red, you're ready to go. Just be sure to run ` grunt test ` after making any changes, to ensure that nothing is broken.
2020
21- ## Submitting pull requests
21+ ## Submitting a Pull Request
2222
23- 1 . Create a new branch, please don't work in your ` master ` branch directly.
24- 1 . Add failing tests for the change you want to make. Run ` grunt ` to see the tests fail.
25- 1 . Fix stuff.
26- 1 . Run ` grunt ` to see if the tests pass. Repeat steps 2-4 until done.
27- 1 . Update the documentation to reflect any changes.
28- 1 . Push to your fork and submit a pull request.
23+ Before you submit your pull request consider the following guidelines:
24+
25+ * Search [ GitHub] ( https://github.com/angular/angular.js/pulls ) for an open or closed Pull Request
26+ that relates to your submission. You don't want to duplicate effort.
27+ * Please sign our [ Contributor License Agreement (CLA)] ( #signing-the-cla ) before sending pull
28+ requests. We cannot accept code without this.
29+ * Make your changes in a new git branch
30+
31+ ``` shell
32+ git checkout -b my-fix-branch master
33+ ```
34+
35+ * Create your patch, including appropriate test cases.
36+ * Follow our [Coding Rules](# coding-rules)
37+ * Commit your changes and create a descriptive commit message (the
38+ commit message is used to generate release notes, please check out our
39+ [commit message conventions](# commit-message-format) and our commit message presubmit hook
40+ ` validate-commit-msg.js` ):
41+
42+ ` ` ` shell
43+ git commit -a
44+ ` ` `
45+
46+ * Build your changes locally to ensure all the tests pass
47+
48+ ` ` ` shell
49+ grunt test
50+ ` ` `
51+
52+ * Push your branch to Github:
53+
54+ ` ` ` shell
55+ git push origin my-fix-branch
56+ ` ` `
57+
58+ * In Github, send a pull request to ` angular-strap:master` .
59+ * If we suggest changes then you can modify your branch, rebase and force a new push to your GitHub
60+ repository to update the Pull Request:
61+
62+ ` ` ` shell
63+ git rebase master -i
64+ git push -f
65+ ` ` `
66+
67+ That' s it! Thank you for your contribution!
68+
69+ When the patch is reviewed and merged, you can safely delete your branch and pull the changes
70+ from the main (upstream) repository:
71+
72+ * Delete the remote branch on Github:
73+
74+ ```shell
75+ git push origin --delete my-fix-branch
76+ ```
77+
78+ * Check out the master branch:
79+
80+ ```shell
81+ git checkout master -f
82+ ```
83+
84+ * Delete the local branch:
85+
86+ ```shell
87+ git branch -D my-fix-branch
88+ ```
89+
90+ * Update your master with the latest upstream version:
91+
92+ ```shell
93+ git pull --ff upstream master
94+ ```
95+
96+
97+ ## Git Commit Guidelines
98+
99+ We have very precise rules over how our git commit messages can be formatted. This leads to **more
100+ readable messages** that are easy to follow when looking through the **project history**. But also,
101+ we use the git commit messages to **generate the AngularJS change log**.
102+
103+ ### Commit Message Format
104+ Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
105+ format that includes a **type**, a **scope** and a **subject**:
106+
107+ ```
108+ <type>(<scope>): <subject>
109+ <BLANK LINE>
110+ <body>
111+ <BLANK LINE>
112+ <footer>
113+ ```
114+
115+ Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
116+ to read on github as well as in various git tools.
117+
118+ ### Type
119+ Must be one of the following:
120+
121+ * **feat**: A new feature
122+ * **fix**: A bug fix
123+ * **docs**: Documentation only changes
124+ * **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
125+ semi-colons, etc)
126+ * **refactor**: A code change that neither fixes a bug or adds a feature
127+ * **perf**: A code change that improves performance
128+ * **test**: Adding missing tests
129+ * **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
130+ generation
131+
132+ ### Scope
133+ The scope could be anything specifying place of the commit change. For example `$location`,
134+ `$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`, `ngView`, etc...
135+
136+ ### Subject
137+ The subject contains succinct description of the change:
138+
139+ * use the imperative, present tense: "change" not "changed" nor "changes"
140+ * don' t capitalize first letter
141+ * no dot (.) at the end
142+
143+ # ##Body
144+ Just as in the ** subject** , use the imperative, present tense: " change" not " changed" nor " changes"
145+ The body should include the motivation for the change and contrast this with previous behavior.
146+
147+ # ##Footer
148+ The footer should contain any information about ** Breaking Changes** and is also the place to
149+ reference GitHub issues that this commit ** Closes** .
0 commit comments