Skip to content

Commit 7b45399

Browse files
authored
Updated issue templates and contributing guide (#801)
1 parent b457b95 commit 7b45399

File tree

6 files changed

+153
-205
lines changed

6 files changed

+153
-205
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Bug report
3+
about: Report an issue with a specific sample
4+
title: '[BUG] in sample: '
5+
labels: 'type: bug'
6+
assignees: ''
7+
---
8+
9+
### Which sample has a bug?
10+
11+
**Sample name or URL where you found the bug**
12+
13+
### How to reproduce the issue
14+
15+
**Failing Function code used (if you modified the sample)**
16+
17+
**Steps to set up and reproduce**
18+
19+
<!-- Help us diagnose the issue. Please provide detailed instructions to run your minimal repro or to recreate the environment -->
20+
21+
### Debug output
22+
23+
<!-- Provide any error messages or screenshots of unexpected behavior -->
24+
25+
**Errors in the
26+
[console logs](https://console.firebase.google.com/project/_/functions/logs?search=&severity=DEBUG)**
27+
28+
**Screenshots**
29+
30+
### Expected behavior
31+
32+
<!-- What is the expected behavior? -->
33+
34+
### Actual behavior
35+
36+
<!-- What is the actual behavior? -->

.github/ISSUE_TEMPLATE/config.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# https://docs.github.com/en/free-pro-team@latest/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
2+
3+
blank_issues_enabled: false
4+
contact_links:
5+
- name: Propose a new sample, or get help setting up a sample
6+
url: https://github.com/firebase/functions-samples/discussions
7+
about: Informal help and discussion about the samples in this repository.
8+
- name: Issues with the Firebase platform
9+
url: https://firebase.google.com/support
10+
about: Report issues with Firebase services to Firebase support.

.github/ISSUE_TEMPLATE/docs.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Documentation issue
3+
about: Are a sample's docs incorrect or unclear?
4+
title: '[DOCS] for sample: '
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
<!-- This is only for issues with the documentation in this repository. -->
10+
11+
### Which sample?
12+
13+
**Sample name or URL** **Link to closest heading**
14+
15+
### What is the issue with this sample's docs?
16+
17+
<!-- Broken link, unclear step, outdated step, etc... -->

CONTRIBUTING.md

+77-141
Original file line numberDiff line numberDiff line change
@@ -1,181 +1,117 @@
11
# Contributing to the Firebase Cloud Functions Templates Library
22

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:
46

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)
1213

1314
## <a name="coc"></a> Code of Conduct
1415

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.
1620

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.
1825

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.
2030

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.
2234

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).
2438

2539
## <a name="question"></a> Got a Question or Problem?
2640

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).
3950

4051
## <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.
4456

4557
See [below](#submit) for some guidelines.
4658

4759
## <a name="submit"></a> Submission Guidelines
4860

4961
### 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:
9562

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.
9965

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.
15168

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.
15372

154-
```shell
155-
git branch -D my-fix-branch
156-
```
73+
### New samples
15774

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).
15979

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:
16382

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
16588

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)!
16792

16893
## <a name="cla"></a> Signing the CLA
16994

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.
172105

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!
174109

175110
[github]: https://github.com/firebase/functions-samples
176111
[google-cla]: https://cla.developers.google.com
177112
[js-style-guide]: http://google.github.io/styleguide/javascriptguide.xml
178113
[py-style-guide]: http://google.github.io/styleguide/pyguide.html
179114
[jsbin]: http://jsbin.com/
180115
[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

ISSUE_TEMPLATE.md

-64
This file was deleted.

0 commit comments

Comments
 (0)