fxa-auth-server/CONTRIBUTING.md

86 строки
3.6 KiB
Markdown
Исходник Обычный вид История

# Contributing
2014-05-16 06:37:59 +04:00
Anyone is welcome to help with Firefox Accounts. Feel free to get in touch with other community members on IRC, the
mailing list or through issues here on GitHub.
- IRC: `#fxa` on `irc.mozilla.org`
- Mailing list: <https://mail.mozilla.org/listinfo/dev-fxacct>
- and of course, [the issues list](https://github.com/mozilla/fxa-auth-server/issues)
2014-05-16 06:37:59 +04:00
## Bug Reports ##
You can file issues here on GitHub. Please try to include as much information as you can and under what conditions
you saw the issue.
## Sending Pull Requests ##
Patches should be submitted as pull requests (PR).
2014-05-16 06:37:59 +04:00
Before submitting a PR:
- Your code must run and pass all the automated tests before you submit your PR for review. "Work in progress" pull requests are allowed to be submitted, but should be clearly labeled as such and should not be merged until all tests pass and the code has been reviewed.
- Run `grunt eslint` to make sure your code passes linting.
- Run `npm test` to make sure all tests still pass.
- Your patch should include new tests that cover your changes. It is your and your reviewer's responsibility to ensure your patch includes adequate tests.
When submitting a PR:
- You agree to license your code under the project's open source license ([MPL 2.0](/LICENSE)).
- Base your branch off the current `master` (see below for an example workflow).
- Add both your code and new tests if relevant.
- Run `grunt eslint` and `npm test` to make sure your code passes linting and tests.
- Please do not include merge commits in pull requests; include only commits with the new relevant code.
- Your commit message must follow the
[commit guidelines](https://github.com/mozilla/fxa/blob/master/CONTRIBUTING.md#git-commit-guidelines).
After your PR is merged:
- Add yourself to the [AUTHORS](/AUTHORS) file so we can publicly recognize your contribution.
2014-05-16 06:37:59 +04:00
See the main [README.md](/README.md) for information on prerequisites, installing, running and testing.
2014-05-16 06:37:59 +04:00
## Code Review ##
This project is production Mozilla code and subject to our [engineering practices and quality standards](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Committing_Rules_and_Responsibilities). Every patch must be peer reviewed. This project is part of the [Firefox Accounts module](https://wiki.mozilla.org/Modules/Other#Firefox_Accounts), and your patch must be reviewed by one of the listed module owners or peers.
2014-05-16 06:37:59 +04:00
## Example Workflow ##
2014-05-16 07:37:11 +04:00
This is an example workflow to make it easier to submit Pull Requests. Imagine your username is `user1`:
2014-05-16 06:37:59 +04:00
1. Fork this repository via the GitHub interface
2014-05-16 06:37:59 +04:00
2. The clone the upstream (as origin) and add your own repo as a remote:
2014-05-16 06:37:59 +04:00
```sh
2014-05-16 07:37:11 +04:00
$ git clone https://github.com/mozilla/fxa-auth-server.git
$ cd fxa-auth-server
$ git remote add user1 git@github.com:user1/fxa-auth-server.git
```
2014-05-16 06:37:59 +04:00
3. Create a branch for your fix/feature and make sure it's your currently checked-out branch:
2014-05-16 06:37:59 +04:00
```sh
2014-05-16 07:37:11 +04:00
$ git checkout -b add-new-feature
```
2014-05-16 06:37:59 +04:00
4. Add/fix code, add tests then commit and push this branch to your repo:
2014-05-16 06:37:59 +04:00
```sh
2014-05-16 07:37:11 +04:00
$ git add <files...>
$ git commit
$ git push user1 add-new-feature
```
2014-05-16 06:37:59 +04:00
5. From the GitHub interface for your repo, click the `Review Changes and Pull Request` which appears next to your new branch.
2014-05-16 06:37:59 +04:00
6. Click `Send pull request`.
2014-05-16 06:37:59 +04:00
2014-05-16 07:37:11 +04:00
### Keeping up to Date ###
2014-05-16 06:37:59 +04:00
The main reason for creating a new branch for each feature or fix is so that you can track master correctly. If you need
2014-05-16 07:37:11 +04:00
to fetch the latest code for a new fix, try the following:
2014-05-16 06:37:59 +04:00
```sh
$ git checkout master
$ git pull
```
2014-05-16 06:37:59 +04:00
Now you're ready to branch again for your new feature (from step 3 above).