Skip to content

Commit 7ccc77c

Browse files
authored
Contributing updates [triage-skip] (#113)
* WIP: update CONTRIBUTING.md * WIP: 1st draft contributing guidelines * WIP: slight updates * WIP: updates from review * WIP: changes from @hiranya911
1 parent 63d7768 commit 7ccc77c

File tree

1 file changed

+111
-24
lines changed

1 file changed

+111
-24
lines changed

CONTRIBUTING.md

+111-24
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,126 @@
1-
Want to contribute? Great! First, read this page (including the small print at
2-
the end).
1+
# Contributing to the Firebase JS SDK
2+
3+
We'd love for you to contribute to our source code and to help make the Firebase JS SDK even better than it is today! Here are the guidelines we'd like you to follow:
4+
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)
12+
13+
## <a name="coc"></a> Code of Conduct
14+
15+
As contributors and maintainers of the Firebase JS SDK 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+
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.
18+
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.
20+
21+
If any member of the community violates this code of conduct, the maintainers of the Firebase JS SDK project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate.
22+
23+
If you are subject to or witness unacceptable behavior, or have any other concerns, please drop us a line at [email protected].
24+
25+
## <a name="question"></a> Got a Question?
26+
27+
If you have questions about how to use the Firebase JS SDK, please direct these to [StackOverflow][stackoverflow] and use the `firebase` and `javascript` tags. You can also use the [Firebase Google Group][firebase-google-group] or [Slack][slack] to contact members of the Firebase team for help.
28+
29+
## <a name="issue"></a> Found an Issue?
30+
31+
If you find a bug in the source code, a mistake in the documentation, or some other issue, you can help us by submitting an issue to our [GitHub Repository][github]. Even better you can submit a Pull Request with a test demonstrating the bug and a fix!
32+
33+
See [below](#submit) for some guidelines.
34+
35+
## <a name="other-issue"></a> Production Issues
36+
37+
If you have a production issue, please [contact Firebase support][support] who will work with you to resolve the issue.
38+
39+
## <a name="submit"></a> Submission Guidelines
40+
41+
### Submitting an Issue
42+
43+
Before you submit your issue, try searching [past issues][archive], [StackOverflow][stackoverflow], and the [Firebase Google Group][firebase-google-group] for issues similar to your own. You can help us to maximize the effort we spend fixing issues, and adding new features, by not reporting duplicate issues.
44+
45+
If your issue appears to be a bug, and hasn't been reported, open a new issue. Providing the following information will increase the chances of your issue being dealt with quickly:
46+
47+
* **Description of the Issue** - if an error is being thrown a non-minified stack trace helps
48+
* **Motivation for or Use Case** - explain why this is a bug for you
49+
* **Related Issues** - has a similar issue been reported before?
50+
* **Environment Configuration** - is this a problem with Node.js, or only a specific browser? Is this only in a specific version of the SDK?
51+
* **Reproduce the Error** - provide a live example (like [JSBin][jsbin]), a Github repo, or an unambiguous set of steps
52+
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit)
53+
54+
There is an issue template provided to help capture all of this information. Following the template will also help us to route your issue to the appropriate teams faster, helping us to better help you!
55+
56+
Also as a great rule of thumb:
57+
58+
**If you get help, help others. Good karma rulez!**
59+
60+
### Submitting a Pull Request
361

462
### Before you contribute
563

6-
Before we can use your code, you must sign the [Google Individual Contributor
7-
License Agreement](https://cla.developers.google.com/about/google-individual)
8-
(CLA), which you can do online. The CLA is necessary mainly because you own the
9-
copyright to your changes, even after your contribution becomes part of our
10-
codebase, so we need your permission to use and distribute your code. We also
11-
need to be sure of various other things—for instance that you'll tell us if you
12-
know that your code infringes on other people's patents. You don't have to sign
13-
the CLA until after you've submitted your code for review and a member has
14-
approved it, but you must do it before we can put your code into our codebase.
15-
Before you start working on a larger contribution, you should get in touch with
16-
us first through the issue tracker with your idea so that we can help out and
17-
possibly guide you. Coordinating up front makes it much easier to avoid
18-
frustration later on.
64+
Before we can use your code, you must sign the [Google Individual Contributor License Agreement][google-cla] (CLA), which you can do online. The CLA is necessary mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things, for instance, that you'll tell us if you know that your code infringes on other people's patents. You don't have to sign the CLA until after you've submitted your code for review and a member has approved it, but you must do it before we can put your code into our codebase. There is also a nifty CLA bot that will guide you through this process if you are going through it for the first time.
65+
66+
Before you start working on a larger contribution, you should get in touch with us first through the issue tracker with your idea so that we can help out and possibly guide you. Coordinating up front makes it much easier to avoid frustration later on. Some pull requests (large contributions, API additions/changes, etc) may be subject to additional internal review, we appreciate your patience as we fully validate your contribution.
1967

20-
### Code reviews
68+
### Pull Request Guidelines
2169

22-
All submissions, including submissions by project members, require review. We
23-
use Github pull requests for this purpose.
70+
* Search [GitHub](https://github.com/firebase/firebase-js-sdk/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
71+
* Create an issue to discuss a change before submitting a PR. We'd hate to have to turn down your contributions because of something that could have been communicated early on.
72+
* [Create a fork of the GitHub repo][fork-repo] to ensure that you can push your changes for us to review.
73+
* Make your changes in a new git branch:
2474

25-
### The small print
75+
```shell
76+
git checkout -b my-fix-branch master
77+
```
2678

27-
Contributions made by corporations are covered by a different agreement than the
28-
one above, the [Software Grant and Corporate Contributor License
29-
Agreement](https://cla.developers.google.com/about/google-corporate).
79+
* Create your patch, **including appropriate test cases**. Patches with tests are more likely to be merged.
80+
* Avoid checking in files that shouldn't be tracked (e.g `node_modules`, `gulp-cache`, `.tmp`, `.idea`). If your development setup automatically creates some of these files, please add them to the `.gitignore` at the root of the package (click [here][gitignore] to read more on how to add entries to the `.gitignore`).
81+
* Commit your changes using a commit message that follows our [commit message guidelines](#commit-message-guidelines).
3082

31-
### Commit messages
83+
```shell
84+
git commit -a
85+
```
86+
_Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files._
87+
88+
* Test your changes locally to ensure everything is in good working order:
89+
90+
```shell
91+
npm test
92+
```
93+
94+
* Push your branch to your fork on GitHub:
95+
96+
```shell
97+
git push origin my-fix-branch
98+
```
99+
100+
* In GitHub, send a pull request to `firebase-js-sdk:master`.
101+
* All pull requests must be reviewed by a member of the Firebase JS SDK team, who will merge it when/if they feel it is good to go.
102+
103+
That's it! Thank you for your contribution!
104+
105+
## <a name="commit-message-guidelines"></a> Commit Message Guidelines
32106
33107
This repository follows the commit message format defined by the
34108
[validate-commit-msg](https://npm.im/validate-commit-msg) package on NPM. This is
35109
to make the git history easy to follow, and make it easier to identify which
36110
commits are associated with features, bugfixes, etc.
37111
38112
We are also Commitizen friendly! If you have the [Commitizen CLI](https://npm.im/commitizen) installed
39-
you can simply use `git cz` to create properly formatted commit messages.
113+
you can simply use `git cz` to create properly formatted commit messages.
114+
115+
[archive]: https://github.com/firebase/firebase-js-sdk/issues?utf8=%E2%9C%93&q=is%3Aissue
116+
[file-an-issue]: https://github.com/firebase/firebase-js-sdk/issues/new
117+
[firebase-google-group]: https://groups.google.com/forum/#!forum/firebase-talk
118+
[fork-repo]: https://github.com/firebase/firebase-js-sdk/fork
119+
[github]: https://github.com/firebase/firebase-js-sdk
120+
[gitignore]: https://git-scm.com/docs/gitignore
121+
[google-cla]: https://cla.developers.google.com/about/google-individual
122+
[js-style-guide]: http://google.github.io/styleguide/javascriptguide.xml
123+
[jsbin]: http://jsbin.com/rinilu/edit?js,console
124+
[slack]: https://firebase-community.appspot.com/
125+
[stackoverflow]: http://stackoverflow.com/questions/tagged/firebase
126+
[support]: https://firebase.google.com/support/

0 commit comments

Comments
 (0)