Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
docs(contributing): Use CONTRIBUTING.md in zanata-server
Browse files Browse the repository at this point in the history
  • Loading branch information
definite committed Mar 11, 2016
1 parent 4ef7635 commit aaac198
Showing 1 changed file with 1 addition and 149 deletions.
150 changes: 1 addition & 149 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,152 +1,4 @@
# Contributing to Zanata

We would love for you to contribute to our source code and to make Zanata
even better than it is today! Here are the guidelines we would like you to
follow:

## <a name="Feedback_or_Issues">Feedback or Issues</a>
If you find a bug, want a feature, or generally want to express your feeling
toward Zanata, please go to our [issue system](https://zanata.atlassian.net/)

## <a name="Pull_Requests">Pull Requests</a>
Pull requests welcome!

### <a name="Setup">Setup</a>
The
[Developer Setup Guide](https://github.com/zanata/zanata-server/wiki/Developer-Guide)
shows the dependencies and how to setup Java, Maven, MySQL, JBoss, and IDE.

### Branches
The branches that should be targeted in pull requests
- **master**: New features, bug fix, enhancement should target this branch.
If you are unsure which branch to make pull request, use this branch.
- **release**: Only urgent bug fix and documentation should target this
branch.

### <a name="Commit_Message_Format"> Commit Message Format</a>
We are inspired the [angular commit message format]
(https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit),
that is:

Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:

```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The **header** is mandatory and the **scope** of the header is optional.

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on GitHub as well as in various git tools.

#### Type
Must be one of the following:

- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
semi-colons, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing tests
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
generation
- **revert**: reverts a previous commit. The subject should be the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.

#### Scope
The scope could be anything specifying place of the commit change. For example `$location`,
`$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`, `ngView`, etc...

#### Subject
The subject contains succinct description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* do not capitalize first letter
* no dot (.) at the end

#### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.

#### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

### Submit a Pull Request


1. Make your changes in a new git branch:

```shell
git checkout -b my-pr-branch master
```
2. Create your patch, **including appropriate test cases**.
3. Commit your changes using a descriptive commit message that follows our
[commit message format](#Commit_Message_Format).

```shell
git commit -a
```
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.


4. Push your branch to GitHub:

```shell
git push --set-upstream origin my-pr-branch
```

5. In GitHub, target the pull request to `zanata:master`.
6. If we suggest changes then:
a. Make the required updates.
b. Commit your changes to your branch (e.g. `my-pr-branch`).
* Push the changes to your GitHub repository (this will update your Pull Request).

7. If the PR gets too outdated we may ask you to rebase and force push to
update the pull request:
```shell
git rebase master -i
git push origin my-pr-branch -f
```

*WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments
on code that were previously made by you and others in your commits.*

That is it! Thank you for your contribution!

### After your pull request is merged

After your pull request is merged, you can safely delete your branch and
pull the changes from the **master** (or **release** branch if you were
working with release) branch of main (upstream) repository.

* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
```shell
git push origin --delete my-pr-branch
```

* Check out the master branch:

```shell
git checkout master -f
```

* Delete the local branch:

```shell
git branch -D my-pr-branch
```

* Update your master with the latest upstream version:

```shell
git pull --ff upstream master
```
Please refer the [CONTRIBUTING.md](https://github.com/zanata/zanata-server/blob/release/CONTRIBUTING.md) of [zanata-server](https://github.com/zanata/zanata-server/)

0 comments on commit aaac198

Please sign in to comment.