Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Update contributing.md which is a copy of how-to-contribute.md in apa…
Browse files Browse the repository at this point in the history
  • Loading branch information
YorkShen committed Feb 15, 2019
1 parent 7659a59 commit cd893d3
Showing 1 changed file with 33 additions and 89 deletions.
122 changes: 33 additions & 89 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,110 +1,54 @@
# How to Contribute
# Join Weex community

Welcome to create [pull requests](https://github.com/apache/incubator-weex/compare) or join in our [mailing list](http://mail-archives.apache.org/mod_mbox/incubator-weex-dev/) for the bug fix, doc, example, suggestion and anything.
> Community over code
## Join in Weex Mailing List
Weex project belongs to Apache Software Foundation and Weex community respects and fulfills the Apache rule, which is **Community over code** .

In Weex community all discussions happen on mailing list.
## Code of Conduct

Just send an email to `[email protected]` and follow the instructions to subscribe Weex dev mailing list. Then you will receive discussions and community messages with your personal email. You can also reply back or publish your opinions freely to join the community discussion.
To make an open and friendly community, Weex community adopt [Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct) as the code of conduct.

You can also access the mail archives through the [web portal](http://mail-archives.apache.org/mod_mbox/incubator-weex-dev/).
## Mailing List
> If it didn't happen on a mailing list, it didn't happen.
*To unsubscribe the mailing list: send an email to `dev-unsubscribe@weex.incubator.apache.org` and follow the instructions.*
**Subscribing mailing list of weex is necessary to join weex community.**

Besides Weex dev mailing list channel, there are `commits` and `user ` channels available for subscription. Check them out [here](http://mail-archives.apache.org/mod_mbox/#weex.incubator).
In Weex community, feature requests, discussions and decisions happen on the mailing list, which is open to the whole world.

## Branch Management
`[email protected]` is the mailing list's address. Developers can subscribe this list to know what is happening in weex community and express his/her idea. Send an email to [subscription](mailto:[email protected]?subject=%28send%20this%20email%20to%20subscribe%29) then you will receive a confirmation email. Once you reply the confirmation email, the subscription is done.

### Principles
If you want to unsubscribe, send an email to [Canceling subscription](mailto:[email protected]?subject=%28send%20this%20email%20to%20unsubscribe%29)

* Use `rebase` instead of `merge` when merging PRs when you work on a single branch, in order to keep it simple and clean for review.
* Only use `merge` when publishing beta and Apache release, or merging back changes on temporary branches back to `master` branch.
* **DO NOT USE FEATURE BRANCH** if it is really needed.
Read [Apache mailing list](https://apache.org/foundation/mailinglists.html) to have a deeper view of mailing list.

![Branch Management](https://user-images.githubusercontent.com/700736/42321369-4587dc10-808b-11e8-9d8c-6356fde71244.png)

### Permanent Branches
## Ask or Answer Questions
* You ask questions on [stackoverflow.com](http://stackoverflow.com/questions/tagged/weex) for basic use problems and concepts.
* You can report a bug through Github Issue as mention in [bug report](https://weex.io/guide/contribute/bug-report-guidelines.html).

0. `master` branch
* `master` is the development branch, which tracks the bleeding-edge daily development works and is unstable from time to time.
1. `beta` branch
* It is the beta publish branch, we take is as the project's `Beta Release Channel`, each commit on this branch tracks a beta version, with a `beta release tag` attached to it.
2. `release` branch
* The `release` is the Apache release publish branch, we take it as the project's `Stable Release Channel`, each commit on it tracks a release version, with a `release tag` attached to it.
**Tip**:
> Formally speaking, StackOverflow is not part of Weex community though developers around the world continually contribute to it. If your question on StackOverflow doesn't get response within 96 hours, you can fire a [Github Issue](https://github.com/apache/incubator-weex/issues) with link to your question on StackOverflow.
### Temporary Branches
**Warning**:
> Only the following types of issues are valid Github issues, for other problem, ask it in the mailing list.
> * Bug
> * StackOverflow questions, which doesn't get response over 96 hours.
0. beta candidates branches
* A beta candidate branch tracks a beta release process.
* A beta version will be released weekly, usually a beta branch will be branched off from `master` branch every Thursday evening to start a beta release, bug fixes for the release goes to this branch, and it will be released on the next Monday morning, after merging into the `beta` branch, a beta release tag will be attached to the specific commit on `beta` branch to identify a beta release.
* The branch name should be `beta-0.xx.x`, a beta release can only grow the last digit of the version number as the beta version number.
* The tag name for a beta release should be `beta-0.xx.x`.
* This beta candidate branch will be removed soon after it is merged into the `beta` branch.
1. release candidates branches
* A release candidate branch tracks an Apache release process.
* A release candidate branch will be branched off from the `beta` branch when we propose an Apache release, the frequency would be per month. We will follow the release process on this branch, including signoff, RC review, etc., after the Apache release vote, this branch will merge into `release` branch and a release tag will be attached to the merge commit to identifying an Apache release version.
* The branch name should be `rc-0.xx.0`, and it grows the middle digits as a release number.
* The release tag name for an Apache release should be `v0.xx.0`.
* This release candidate branch will be removed soon after it is merged into the `release` branch.
2. feature branches
* Usually, it is not recommended to open a feature branch unless you are working on a breaking change feature which affects master branch a lot; or you are working on something for the next release, which is not supposed to be published with this release version.
* A feature branch can only be branched off from the `master` branch, and can only be merged back to `master` branch when complete. It is not allowed to start a beta or Apache release from feature branch. It should be deleted soon after it is merged back to `master`.
* Start a discussion in the mailing list and get approval from PMC members before you want to branch off a feature branch.

## Commit Log
## Contribute Code or document
In Weex community, **Documentation is as important as code**, and Weex community respects all the contribution of documentation or code.

```
[{module|issueID}] {title}
**Tip**:
> Weex adopts [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) as its open source license. Make sure your contribution obeys the requirement of Apache License 2.0.
{summary}
```
### Contribute documentation
Documentation with good quality is a great help to developers. If there is a powerful API that is not easy to use, it becomes useless. So, we welcome any contributions to help Weex's documents become precise and easy to read.

* `{module|issueID}`
* Use a module name as a heads-up for the major changes in this commit.
* Or use an Apache JIRA issue ID: `[Weex-xxx]` to track the changes for the issue.
* The available module name includes but not limited to android, ios, jsfm, html5, component, doc, example, test, etc.
* `{title}`
* A summary for your commit, no more than 80 characters including the module or issue ID.
* `{summary}`
* Explain a little bit more about what you have changed in your commit, how does it design, potential impact on other modules, or what is your next move. More detailed you explain, more easily the codebase gets maintained.
You can contribute to a document through the following ways:
* Click **Edit this page** on the bottom of website, and you will be navigated to a new Github PR.

A good commit log should look like this:
**Tip**
> PR about documentation should be fired based on **draft** branch currently, which will be merged master branch automatically later when all things are settled.
```
commit e110f0a32b6cfe6d0adb006a931f6d7fd9de7c01
Author: Adam Feng <[email protected]>
Date: Mon Jun 11 18:34:26 2018 +0800
[Script] release preparing:
1. add missing modules in package.json
2. move html5 folder to runtime folder in release_file.rules
3. modify js-framework path in build_from_source.sh
4. add NDK environment setup to HOW-TO-BUILD.md
```

## Pull Request

You can [create pull requests](https://github.com/apache/incubator-weex/compare) in GitHub.

1. First, we suggest you have some discussion with the community (commonly in our mailing list) before you code.
2. Fork repo from [https://github.com/apache/incubator-weex/](https://github.com/apache/incubator-weex/)
3. Finish the job you want to do.
4. Create a pull request.

## Code Style Guide

### Objective-C

* Tabs for indentation (not space)
* `*` operator goes with the variable name (e.g. Type *variable;)
* Function definitions: place each brace on its own line.
* Other braces: place the open brace on the line preceding the code block; place the close brace on its own line.
* Use `#pragma marks` to categorize methods into functional groupings and protocol implementations
* Follow other guidelines on [GitHub Objective-C Style Guide](https://github.com/github/objective-c-style-guide)

### Java & Android

* Use [Google Java Style](https://google.github.io/styleguide/javaguide.html) as basic guidelines of java code.
* Follow [AOSP Code Style](https://source.android.com/source/code-style.html) for rest of android related code style.
### Contribute code
You can fix a bug or develop a new feature when contributing code, ref [Contribution of Code](https://weex.io/guide/contribute/contribute-code.html) to see more detail.

0 comments on commit cd893d3

Please sign in to comment.