Skip to content

Commit 3ae1a77

Browse files
author
Doug Sigelbaum
committed
Add README and CONTRIBUTING.
1 parent 703db0e commit 3ae1a77

File tree

2 files changed

+180
-4
lines changed

2 files changed

+180
-4
lines changed

Diff for: CONTRIBUTING.md

+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
# Contributing
2+
3+
We'd love for you to contribute to our source code and to make it 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 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 Android'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 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 or Problem?
26+
27+
If you have questions about how to use the project, please direct these to [StackOverflow][stackoverflow] and use the `android` 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+
```
39+
40+
## <a name="issue"></a> Found an Issue?
41+
42+
If you find a bug in the source code or a mistake in the documentation, you can help us by
43+
submitting an issue on this repository. Even better you can submit a Pull Request
44+
with a fix.
45+
46+
See [below](#submit) for some guidelines.
47+
48+
## <a name="submit"></a> Submission Guidelines
49+
50+
### Submitting an Issue
51+
52+
Before you submit your issue search the archive, maybe your question was already answered.
53+
54+
If your issue appears to be a bug, and hasn't been reported, open a new issue.
55+
Help us to maximize the effort we can spend fixing issues and adding new
56+
features, by not reporting duplicate issues. Providing the following information will increase the
57+
chances of your issue being dealt with quickly:
58+
59+
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
60+
* **Motivation for or Use Case** - explain why this is a bug for you
61+
* **Browsers and Operating System** - is this a problem with all browsers or only IE9?
62+
* **Reproduce the Error** - provide a live example or an unambiguous set of steps.
63+
* **Related Issues** - has a similar issue been reported before?
64+
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
65+
causing the problem (line of code or commit)
66+
67+
**If you get help, help others. Good karma rulez!**
68+
69+
Here's a template to get you started:
70+
71+
```
72+
System information (OS, Device, etc):
73+
74+
What steps will reproduce the problem:
75+
1.
76+
2.
77+
3.
78+
79+
What is the expected result?
80+
81+
What happens instead of that?
82+
83+
Code, logs, or screenshot that illustrate the problem:
84+
```
85+
86+
### Submitting a Pull Request
87+
Before you submit your pull request consider the following guidelines:
88+
89+
* Search for an open or closed Pull Request
90+
that relates to your submission. You don't want to duplicate effort.
91+
* Please sign our [Contributor License Agreement (CLA)](#cla) before
92+
sending pull requests. We cannot accept code without this.
93+
* Make your changes in a new git branch:
94+
95+
```shell
96+
git checkout -b my-fix-branch master
97+
```
98+
99+
* Create your patch, **including appropriate test cases**.
100+
* Follow our [Coding Rules](#rules).
101+
* Commit your changes using a descriptive commit message.
102+
103+
```shell
104+
git commit -a
105+
```
106+
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
107+
108+
* Build your changes locally to ensure all the tests pass:
109+
110+
```shell
111+
gulp
112+
```
113+
114+
* Push your branch to GitHub:
115+
116+
```shell
117+
git push origin my-fix-branch
118+
```
119+
120+
* In GitHub, send a pull request to `master`.
121+
* If we suggest changes then:
122+
* Make the required updates.
123+
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
124+
125+
```shell
126+
git rebase master -i
127+
git push origin my-fix-branch -f
128+
```
129+
130+
That's it! Thank you for your contribution!
131+
132+
#### After your pull request is merged
133+
134+
After your pull request is merged, you can safely delete your branch and pull the changes
135+
from the main (upstream) repository:
136+
137+
* Delete the remote branch on GitHub either through the GitHub UI or your local shell as follows:
138+
139+
```shell
140+
git push origin --delete my-fix-branch
141+
```
142+
143+
* Check out the master branch:
144+
145+
```shell
146+
git checkout master -f
147+
```
148+
149+
* Delete the local branch:
150+
151+
```shell
152+
git branch -D my-fix-branch
153+
```
154+
155+
* Update your master with the latest upstream version:
156+
157+
```shell
158+
git pull --ff upstream master
159+
```
160+
161+
## <a name="rules"></a> Coding Rules
162+
163+
We generally follow [Google's style guides][style-guide].
164+
165+
## <a name="cla"></a> Signing the CLA
166+
167+
Please sign our [Contributor License Agreement][google-cla] (CLA) before sending pull requests. For any code
168+
changes to be accepted, the CLA must be signed. It's a quick process, we promise!
169+
170+
*This guide was inspired by the [AngularJS contribution guidelines](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md).*
171+
172+
[google-cla]: https://cla.developers.google.com
173+
[style-guide]: https://android.github.io/kotlin-guides/style.html
174+
[stackoverflow]: http://stackoverflow.com/questions/tagged/android

Diff for: README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Background
2-
New snippets on developer.android.com/guides will be dynamically linked to this repo instead of
3-
written as embedded HTML on the page.
2+
This repository holds code snippets used in Android documentation on [developer.android.com](https://developer.android.com/guide).
3+
4+
# Quality Assurance
5+
The code snippets compile and show best practices. Runtime verification is not needed;
6+
code irrelevant to the doc is usually stubbed out.
47

58
# Contributing
6-
We accept your pull requests! The code must compile and show best practices. Runtime verification
7-
is not needed; code irrelevant to the doc can be stubbed out.
9+
We love contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.

0 commit comments

Comments
 (0)