|
1 | 1 | # Contributing to the Firebase Cloud Functions Templates Library
|
2 | 2 |
|
3 |
| -We'd love for you to contribute to our source code and to make the Firebase Cloud Functions Templates Library even better than it is today! Here are the guidelines we'd like you to follow: |
| 3 | +We'd love for you to contribute to our source code and to make the Firebase |
| 4 | +Cloud Functions Templates Library even better than it is today! Here are the |
| 5 | +guidelines we'd like you to follow: |
4 | 6 |
|
5 |
| - - [Code of Conduct](#coc) |
6 |
| - - [Question or Problem?](#question) |
7 |
| - - [Issues and Bugs](#issue) |
8 |
| - - [Feature Requests](#feature) |
9 |
| - - [Submission Guidelines](#submit) |
10 |
| - - [Coding Rules](#rules) |
11 |
| - - [Signing the CLA](#cla) |
| 7 | +- [Code of Conduct](#coc) |
| 8 | +- [Question or Problem?](#question) |
| 9 | +- [Issues and Bugs](#issue) |
| 10 | +- [Feature Requests](#feature) |
| 11 | +- [Submission Guidelines](#submit) |
| 12 | +- [Signing the CLA](#cla) |
12 | 13 |
|
13 | 14 | ## <a name="coc"></a> Code of Conduct
|
14 | 15 |
|
15 |
| -As contributors and maintainers of the Firebase Cloud Functions Templates Library project, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities. |
| 16 | +As contributors and maintainers of the Firebase functions-samples project, we |
| 17 | +pledge to respect everyone who contributes by posting issues, updating |
| 18 | +documentation, submitting pull requests, providing feedback in comments, and any |
| 19 | +other activities. |
16 | 20 |
|
17 |
| -Communication through any of Firebase's channels (GitHub, StackOverflow, Google+, Twitter, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. |
| 21 | +Communication through any of Firebase's channels (GitHub, StackOverflow, |
| 22 | +Twitter, etc.) must be constructive and never resort to personal attacks, |
| 23 | +trolling, public or private harassment, insults, or other unprofessional |
| 24 | +conduct. |
18 | 25 |
|
19 |
| -We promise to extend courtesy and respect to everyone involved in this project regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to the project to do the same. |
| 26 | +We promise to extend courtesy and respect to everyone involved in this project |
| 27 | +regardless of gender, gender identity, sexual orientation, disability, age, |
| 28 | +race, ethnicity, religion, or level of experience. We expect anyone contributing |
| 29 | +to the project to do the same. |
20 | 30 |
|
21 |
| -If any member of the community violates this code of conduct, the maintainers of the Firebase Cloud Functions Templates Library project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate. |
| 31 | +If any member of the community violates this code of conduct, the maintainers of |
| 32 | +this project may take action, removing issues, comments, and PRs or blocking |
| 33 | +accounts as deemed appropriate. |
22 | 34 |
|
23 |
| -If you are subject to or witness unacceptable behavior, or have any other concerns, please drop us a line at [email protected]. |
| 35 | +If you are subject to or witness unacceptable behavior, or have any other |
| 36 | +concerns, please drop us a line at |
| 37 | +[Firebase support](https://firebase.google.com/support). |
24 | 38 |
|
25 | 39 | ## <a name="question"></a> Got a Question or Problem?
|
26 | 40 |
|
27 |
| -If you have questions about how to use the Firebase Cloud Functions Templates Library, please direct these to [StackOverflow][stackoverflow] and use the `firebase` tag. We are also available on GitHub issues. |
28 |
| - |
29 |
| -If you feel that we're missing an important bit of documentation, feel free to |
30 |
| -file an issue so we can help. Here's an example to get you started: |
31 |
| - |
32 |
| -``` |
33 |
| -What are you trying to do or find out more about? |
34 |
| -
|
35 |
| -Where have you looked? |
36 |
| -
|
37 |
| -Where did you expect to find this information? |
38 |
| -``` |
| 41 | +- To report specific problems with the samples in this repository, file an |
| 42 | + [issue](#issue). |
| 43 | +- If you have questions about a sample in this repository, try opening a |
| 44 | + [discussion](https://github.com/firebase/functions-samples/discussions). |
| 45 | +- For general Cloud Functions for Firebase questions, please ask on |
| 46 | + [StackOverflow][stackoverflow] and use the `firebase` tag. |
| 47 | +- If you have a problem specific to your Firebase project, or would like to |
| 48 | + report an issue with Firebase itself, contact |
| 49 | + [Firebase support](https://firebase.google.com/support). |
39 | 50 |
|
40 | 51 | ## <a name="issue"></a> Found an Issue?
|
41 |
| -If you find a bug in the source code or a mistake in the documentation, you can help us by |
42 |
| -submitting an issue to our [GitHub Repository][github]. Even better you can submit a Pull Request |
43 |
| -with a fix. |
| 52 | + |
| 53 | +If you find a bug in the source code or a mistake in the documentation, you can |
| 54 | +help us by submitting an issue to our [GitHub Repository][github]. Even better, |
| 55 | +you can submit a Pull Request with a fix. |
44 | 56 |
|
45 | 57 | See [below](#submit) for some guidelines.
|
46 | 58 |
|
47 | 59 | ## <a name="submit"></a> Submission Guidelines
|
48 | 60 |
|
49 | 61 | ### Submitting an Issue
|
50 |
| -Before you submit your issue search the archive, maybe your question was already answered. |
51 |
| - |
52 |
| -If your issue appears to be a bug, and hasn't been reported, open a new issue. |
53 |
| -Help us to maximize the effort we can spend fixing issues and adding new |
54 |
| -features, by not reporting duplicate issues. Providing the following information will increase the |
55 |
| -chances of your issue being dealt with quickly: |
56 |
| - |
57 |
| -* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps |
58 |
| -* **Motivation for or Use Case** - explain why this is a bug for you |
59 |
| -* **Browsers and Operating System** - is this a problem with all browsers or only IE9? |
60 |
| -* **Reproduce the Error** - provide a live example (using JSBin) or a unambiguous set of steps. |
61 |
| -* **Related Issues** - has a similar issue been reported before? |
62 |
| -* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be |
63 |
| - causing the problem (line of code or commit) |
64 |
| - |
65 |
| -**If you get help, help others. Good karma rulez!** |
66 |
| - |
67 |
| -Here's a template to get you started: |
68 |
| - |
69 |
| -``` |
70 |
| -Browser: |
71 |
| -Browser version: |
72 |
| -Operating system: |
73 |
| -Operating system version: |
74 |
| -
|
75 |
| -What steps will reproduce the problem: |
76 |
| -1. |
77 |
| -2. |
78 |
| -3. |
79 |
| -
|
80 |
| -What is the expected result? |
81 |
| -
|
82 |
| -What happens instead of that? |
83 |
| -
|
84 |
| -Please provide any other information below, and attach a screenshot if possible. |
85 |
| -``` |
86 |
| - |
87 |
| -### Submitting a Pull Request |
88 |
| -Before you submit your pull request consider the following guidelines: |
89 |
| - |
90 |
| -* Search [GitHub](https://github.com/firebase/firebase-quickstart-web/pulls) for an open or closed Pull Request |
91 |
| - that relates to your submission. You don't want to duplicate effort. |
92 |
| -* Please sign our [Contributor License Agreement (CLA)](#cla) before sending pull |
93 |
| - requests. We cannot accept code without this. |
94 |
| -* Make your changes in a new git branch: |
95 | 62 |
|
96 |
| - ```shell |
97 |
| - git checkout -b my-fix-branch master |
98 |
| - ``` |
| 63 | +Before you submit your issue search the archive in case your question was |
| 64 | +already answered. |
99 | 65 |
|
100 |
| -* Create your patch, **including appropriate test cases**. |
101 |
| -* Follow our [Coding Rules](#rules). |
102 |
| -* Avoid checking in files that shouldn't be tracked (e.g `node_modules`, `gulp-cache`, `.tmp`, `.idea`). We recommend using a [global](#global-gitignore) gitignore for this. |
103 |
| -* Make sure **not** to include a recompiled version of the files found in `/css` and `/js` as part of your PR. We will generate these automatically. |
104 |
| -* Commit your changes using a descriptive commit message. |
105 |
| -
|
106 |
| - ```shell |
107 |
| - git commit -a |
108 |
| - ``` |
109 |
| - Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. |
110 |
| -
|
111 |
| -* Build your changes locally to ensure all the tests pass: |
112 |
| -
|
113 |
| - ```shell |
114 |
| - gulp |
115 |
| - ``` |
116 |
| -
|
117 |
| -* Push your branch to GitHub: |
118 |
| -
|
119 |
| - ```shell |
120 |
| - git push origin my-fix-branch |
121 |
| - ``` |
122 |
| -
|
123 |
| -* In GitHub, send a pull request to `functions-samples:master`. |
124 |
| -* If we suggest changes then: |
125 |
| - * Make the required updates. |
126 |
| - * Rebase your branch and force push to your GitHub repository (this will update your Pull Request): |
127 |
| -
|
128 |
| - ```shell |
129 |
| - git rebase master -i |
130 |
| - git push origin my-fix-branch -f |
131 |
| - ``` |
132 |
| -
|
133 |
| -That's it! Thank you for your contribution! |
134 |
| - |
135 |
| -#### After your pull request is merged |
136 |
| - |
137 |
| -After your pull request is merged, you can safely delete your branch and pull the changes |
138 |
| -from the main (upstream) repository: |
139 |
| - |
140 |
| -* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: |
141 |
| - |
142 |
| - ```shell |
143 |
| - git push origin --delete my-fix-branch |
144 |
| - ``` |
145 |
| - |
146 |
| -* Check out the master branch: |
147 |
| - |
148 |
| - ```shell |
149 |
| - git checkout master -f |
150 |
| - ``` |
| 66 | +Help us to maximize the effort we can spend fixing issues and adding new |
| 67 | +features by not reporting duplicate issues. |
151 | 68 |
|
152 |
| -* Delete the local branch: |
| 69 | +The more information you can provide in an issue, the faster we can resolve it. |
| 70 | +Issues that don't make an attempt to follow the issue template will likely be |
| 71 | +closed. |
153 | 72 |
|
154 |
| - ```shell |
155 |
| - git branch -D my-fix-branch |
156 |
| - ``` |
| 73 | +### New samples |
157 | 74 |
|
158 |
| -* Update your master with the latest upstream version: |
| 75 | +Given the maintenance cost of the large number of samples that are already in |
| 76 | +this repository, we are unlikely to add new samples. However, if you have an |
| 77 | +idea for a sample and would like to discuss it with others, take a look at the |
| 78 | +["ideas" section of this repository's discussions](https://github.com/firebase/functions-samples/discussions?discussions_q=category%3AIdeas). |
159 | 79 |
|
160 |
| - ```shell |
161 |
| - git pull --ff upstream master |
162 |
| - ``` |
| 80 | +Pull Requests that contain new samples will only be considered if they meet the |
| 81 | +following criteria: |
163 | 82 |
|
164 |
| -## <a name="rules"></a> Coding Rules |
| 83 | +- Solve a common use-case for Cloud Functions for Firebase with minimal |
| 84 | + non-Firebase setup required |
| 85 | +- Thoroughly documented |
| 86 | +- Thoroughly tested |
| 87 | +- Simple enough to be maintained alongside all other samples in the repository |
165 | 88 |
|
166 |
| -We generally follow the [Google JavaScript style guide][js-style-guide]. |
| 89 | +If your Pull Request isn't accepted, consider hosting it in your own GitHub |
| 90 | +repository, and adding it to our |
| 91 | +[list of community-built extensions](./community.md)! |
167 | 92 |
|
168 | 93 | ## <a name="cla"></a> Signing the CLA
|
169 | 94 |
|
170 |
| -Please sign our [Contributor License Agreement][google-cla] (CLA) before sending pull requests. For any code |
171 |
| -changes to be accepted, the CLA must be signed. It's a quick process, we promise! |
| 95 | +Contributions to this project must be accompanied by a Contributor License |
| 96 | +Agreement (CLA). You (or your employer) retain the copyright to your |
| 97 | +contribution; this simply gives us permission to use and redistribute your |
| 98 | +contributions as part of the project. Head over to |
| 99 | +<https://cla.developers.google.com/> to see your current agreements on file or |
| 100 | +to sign a new one. |
| 101 | + |
| 102 | +You generally only need to submit a CLA once, so if you've already submitted one |
| 103 | +(even if it was for a different project), you probably don't need to do it |
| 104 | +again. |
172 | 105 |
|
173 |
| -*This guide was inspired by the [AngularJS contribution guidelines](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md).* |
| 106 | +Please sign our [Contributor License Agreement][google-cla] (CLA) before sending |
| 107 | +pull requests. For any code changes to be accepted, the CLA must be signed. It's |
| 108 | +a quick process, we promise! |
174 | 109 |
|
175 | 110 | [github]: https://github.com/firebase/functions-samples
|
176 | 111 | [google-cla]: https://cla.developers.google.com
|
177 | 112 | [js-style-guide]: http://google.github.io/styleguide/javascriptguide.xml
|
178 | 113 | [py-style-guide]: http://google.github.io/styleguide/pyguide.html
|
179 | 114 | [jsbin]: http://jsbin.com/
|
180 | 115 | [stackoverflow]: http://stackoverflow.com/questions/tagged/firebase
|
181 |
| -[global-gitignore]: https://help.github.com/articles/ignoring-files/#create-a-global-gitignore |
| 116 | +[global-gitignore]: |
| 117 | + https://help.github.com/articles/ignoring-files/#create-a-global-gitignore |
0 commit comments