зеркало из https://github.com/mozilla/fxa.git
74 строки
2.6 KiB
Markdown
74 строки
2.6 KiB
Markdown
# Contributing
|
|
|
|
Anyone is welcome to help with Firefox Accounts. Feel free to get in touch with other community members on Matrix, the
|
|
mailing list or through issues here on GitHub.
|
|
|
|
- Matrix: [#fxa:mozilla.org](https://chat.mozilla.org/#/room/#fxa:mozilla.org)
|
|
- Mailing list: <https://mail.mozilla.org/listinfo/dev-fxacct>
|
|
- and of course, [the bug tracker](https://github.com/mozilla/fxa-customs-server/issues)
|
|
|
|
UPDATE: On March 2020, Mozilla moved from IRC to Matrix. For more information on Matrix, check out the following wiki article: <https://wiki.mozilla.org/Matrix>.
|
|
|
|
## 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. When submitting patches as PRs:
|
|
|
|
- You agree to license your code under the project's open source license ([MPL 2.0](/LICENSE)).
|
|
- Base your branch off the current `main` (see below for an example workflow).
|
|
- Add both your code and new tests if relevant.
|
|
- Run `npm test` to make sure all tests still pass.
|
|
- 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/main/CONTRIBUTING.md#git-commit-guidelines).
|
|
|
|
See the main [README.md](/README.md) for information on prerequisites, installing, running and testing.
|
|
|
|
## Example Workflow
|
|
|
|
This is an example workflow to make it easier to submit Pull Requests. Imagine your username is `user1`:
|
|
|
|
1. Fork this repository via the GitHub interface
|
|
|
|
2. The clone the upstream (as origin) and add your own repo as a remote:
|
|
|
|
```sh
|
|
$ git clone https://github.com/mozilla/fxa-customs-server.git
|
|
$ cd fxa-customs-server
|
|
$ git remote add user1 git@github.com:user1/fxa-customs-server.git
|
|
```
|
|
|
|
3. Create a branch for your fix/feature and make sure it's your currently checked-out branch:
|
|
|
|
```sh
|
|
$ git checkout -b add-new-feature
|
|
```
|
|
|
|
4. Add/fix code, add tests then commit and push this branch to your repo:
|
|
|
|
```sh
|
|
$ git add <files...>
|
|
$ git commit
|
|
$ git push user1 add-new-feature
|
|
```
|
|
|
|
5. From the GitHub interface for your repo, click the `Review Changes and Pull Request` which appears next to your new branch.
|
|
|
|
6. Click `Send pull request`.
|
|
|
|
### Keeping up to Date
|
|
|
|
The main reason for creating a new branch for each feature or fix is so that you can track main correctly. If you need
|
|
to fetch the latest code for a new fix, try the following:
|
|
|
|
```sh
|
|
$ git checkout main
|
|
$ git pull
|
|
```
|
|
|
|
Now you're ready to branch again for your new feature (from step 3 above).
|