Skip to content

Commit 375ce52

Browse files
XadillaXShannonDing
authored andcommittedDec 29, 2018
docs(contributing): add CONTRIBUTING document (#2)
Checklist documentation is changed or added commit message follows commit guidelines
1 parent b928385 commit 375ce52

File tree

6 files changed

+165
-23
lines changed

6 files changed

+165
-23
lines changed
 

Diff for: ‎.github/ISSUE_TEMPLATE.md

-20
This file was deleted.

Diff for: ‎.github/ISSUE_TEMPLATE/bug_report.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: '🐞 Bug Report'
3+
about: 'Report a bug to help us improve'
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## What Happens?
11+
12+
A clear and concise description of what the bug is.
13+
14+
## Minimum Showcase (Required)
15+
16+
> Provide a minimum code or GitHub repository which can reproduce the issue.
17+
18+
## How to Reproduce
19+
20+
**Steps to reproduce the behavior:**
21+
22+
1.
23+
2.
24+
25+
**Expected behavior**
26+
27+
1.
28+
2.
29+
30+
## Context
31+
32+
- **Node Version**:
33+
- **SDK Version**:
34+
- **Platform**:

Diff for: ‎.github/ISSUE_TEMPLATE/feature_request.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: '🐣 Feature Request'
3+
about: 'Suggest an idea for this project'
4+
title: '[Feature Request] say something'
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Background
11+
12+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
13+
14+
## Proposal
15+
16+
Describe the solution you'd like, better to provide some pseudo code.
17+
18+
## Additional context
19+
20+
Add any other context or screenshots about the feature request here.

Diff for: ‎.github/PULL_REQUEST_TEMPLATE.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ Contributors guide: https://github.com/apache/rocketmq-client-nodejs/blob/master
1313
- [ ] `npm test` passes
1414
- [ ] tests and/or benchmarks are included
1515
- [ ] documentation is changed or added
16-
- [ ] commit message follows [commit guidelines](https://github.com/apache/rocketmq-client-nodejs/blob/master/PULL_REQUEST.md#commit-message-guidelines)
16+
- [ ] commit message follows [commit guidelines](https://github.com/apache/rocketmq-client-nodejs/blob/master/CONTRIBUTING.md#commit-message-guidelines)
17+
18+
##### Description of change
19+
20+
+ any feature?
21+
+ Close #[AN_ISSUE_NUMBER]

Diff for: ‎CONTRIBUTING.md

+99-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,99 @@
1-
## TODO
1+
## How To Contribute
2+
3+
We are always very happy to have contributions, whether for trivial cleanups or big new features. We want to have high quality, well documented codes for Node.js client SDK.
4+
5+
Nor is code the only way to contribute to the project. We strongly value documentation, integration with other project, and gladly accept improvements for these aspects.
6+
7+
## Submission Guidelines
8+
9+
### Submitting an Issue
10+
11+
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
12+
13+
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal reproduction. Having a minimal reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions.
14+
15+
A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are fixing the right problem.
16+
17+
We will be insisting on a minimal reproduction scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal reproduction. We understand that sometimes it might be hard to extract essential bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
18+
19+
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
20+
21+
### Submitting a Pull Request (PR)
22+
23+
Before you submit your Pull Request (PR) consider the following guidelines:
24+
25+
1. Search [GitHub](https://github.com/apache/rocketmq-client-nodejs/pulls) for an open or closed PR that relates to your submission. You don't want to duplicate effort.
26+
2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. Discussing the design up front helps to ensure that we're ready to accept your work.
27+
3. Fork the apache/rocketmq-client-nodejs repo.
28+
4. Make your changes in a new git branch:
29+
```
30+
$ git checkout -b your-fix-branch master
31+
```
32+
5. Create your patch, **including appropriate test cases.**
33+
6. Follow our [Coding Rules](#rules).
34+
7. Run the full test suite and ensure that all tests passes.
35+
8. Commit your changes using a descriptive commit message that follows our commit message conventions.
36+
```
37+
$ git commit -a
38+
```
39+
9. Push your branch to GitHub:
40+
```
41+
$ git push origin your-fix-branch
42+
```
43+
10. In GitHub, send a pull request to `rocketmq-client-nodejs:master`.
44+
+ If we suggest changes then:
45+
- Make the required updates.
46+
- Re-run the test suites to ensure tests are still passing.
47+
48+
That's all. Thanks for contributing!
49+
50+
### Coding Rules
51+
52+
To ensure consistency throughout the source code, keep these rules in mind as you are working:
53+
54+
+ All features or bug fixes must be tested by one or more specs (unit-tests).
55+
+ We follow [eslint-config-rocketmq-style](https://www.npmjs.com/package/eslint-config-rocketmq-style) for ESLint.
56+
57+
### Commit Message Guidelines
58+
59+
Our commit message is inspired from [Angular's Commit Message Format](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines).
60+
61+
#### Commit Message Format
62+
63+
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:
64+
65+
```
66+
<type>(<scope>): <subject>
67+
<BLANK LINE>
68+
<body>
69+
<BLANK LINE>
70+
<footer>
71+
```
72+
73+
The **header** is mandatory and the **scope** of the header is optional.
74+
75+
Any line of the commit message cannot be longer 72 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
76+
77+
The footer should contain a [closing reference](https://help.github.com/articles/closing-issues-using-keywords/) to an issue if any.
78+
79+
Samples:
80+
81+
```
82+
chore(package): bump version to 1.0.0.
83+
84+
Close #123
85+
```
86+
87+
##### Type
88+
89+
Must be one of the following:
90+
91+
+ **chore**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
92+
+ **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
93+
+ **docs**: Documentation only changes
94+
+ **feat**: A new feature
95+
+ **fix**: A bug fix
96+
+ **perf**: A code change that improves performance
97+
+ **refactor**: A code change that neither fixes a bug nor adds a feature
98+
+ **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
99+
+ **test**: Adding missing tests or correcting existing tests

Diff for: ‎README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# RocketMQ Client for Node.js
22

3+
[![Version](http://img.shields.io/npm/v/apache-rocketmq.svg)](https://www.npmjs.com/package/apache-rocketmq)
4+
[![Downloads](http://img.shields.io/npm/dm/apache-rocketmq.svg)](https://www.npmjs.com/package/apache-rocketmq)
5+
[![License](https://img.shields.io/npm/l/apache-rocketmq.svg?style=flat)](https://opensource.org/licenses/https://opensource.org/licenses/Apache-2.0)
6+
[![TravisCI](https://travis-ci.org/apache/rocketmq-client-nodejs.svg)](https://travis-ci.org/apache/rocketmq-client-nodejs)
7+
[![Dependency](https://david-dm.org/apache/rocketmq-client-nodejs.svg)](https://david-dm.org/apache/rocketmq-client-nodejs)
8+
39
This official Node.js client is a C++ binding of [rocketmq-client-cpp](https://github.com/apache/rocketmq-client-cpp), which has been proven robust and widely adopted within Alibaba Group by many business units for more than three years.
410

511
> **Notice 1:** This client is still in `dev` version. Use it cautiously in production.
@@ -304,4 +310,3 @@ Contributions are warmly welcome! Be it trivial cleanup, major new feature or ot
304310
## License
305311

306312
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) Copyright (C) Apache Software Foundation
307-

0 commit comments

Comments
 (0)
Please sign in to comment.