ShannonDing closed pull request #2: docs(contributing): add CONTRIBUTING 
document
URL: https://github.com/apache/rocketmq-client-nodejs/pull/2
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 1c4f079..0000000
--- a/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--
-Thank you for reporting an issue.
-
-This issue tracker is for bugs and issues found within RocketMQ Node.js SDK.
-
-Please fill in as much of the template below as you're able.
-
-Version:
-Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
-Subsystem: if known, please specify affected core module name
-
-If possible, please provide code that demonstrates the problem, keeping it as
-simple and free of external dependencies as you are able.
--->
-
-* **Version**:
-* **Platform**:
-* **Subsystem**:
-
-<!-- Enter your issue details below this comment. -->
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md 
b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..9d08747
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,34 @@
+---
+name: '🐞 Bug Report'
+about: 'Report a bug to help us improve'
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+## What Happens?
+
+A clear and concise description of what the bug is.
+
+## Minimum Showcase (Required)
+
+> Provide a minimum code or GitHub repository which can reproduce the issue.
+
+## How to Reproduce
+
+**Steps to reproduce the behavior:**
+
+1.
+2.
+
+**Expected behavior**
+
+1.
+2.
+
+## Context
+
+- **Node Version**:
+- **SDK Version**:
+- **Platform**:
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md 
b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..c1dc69b
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
+---
+name: '🐣 Feature Request'
+about: 'Suggest an idea for this project'
+title: '[Feature Request] say something'
+labels: ''
+assignees: ''
+
+---
+
+## Background
+
+A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...]
+
+## Proposal
+
+Describe the solution you'd like, better to provide some pseudo code.
+
+## Additional context
+
+Add any other context or screenshots about the feature request here.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index c2f77b7..2cad92c 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -13,4 +13,9 @@ Contributors guide: 
https://github.com/apache/rocketmq-client-nodejs/blob/master
 - [ ] `npm test` passes
 - [ ] tests and/or benchmarks are included
 - [ ] documentation is changed or added
-- [ ] commit message follows [commit 
guidelines](https://github.com/apache/rocketmq-client-nodejs/blob/master/PULL_REQUEST.md#commit-message-guidelines)
+- [ ] commit message follows [commit 
guidelines](https://github.com/apache/rocketmq-client-nodejs/blob/master/CONTRIBUTING.md#commit-message-guidelines)
+
+##### Description of change
+
++ any feature?
++ Close #[AN_ISSUE_NUMBER]
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 802ac1f..1740102 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1 +1,99 @@
-## TODO
+## How To Contribute
+
+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.
+
+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.
+
+## Submission Guidelines
+
+### Submitting an Issue
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+### Submitting a Pull Request (PR)
+
+Before you submit your Pull Request (PR) consider the following guidelines:
+
+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.
+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.
+3. Fork the apache/rocketmq-client-nodejs repo.
+4. Make your changes in a new git branch:
+    ```
+    $ git checkout -b your-fix-branch master    
+    ```
+5. Create your patch, **including appropriate test cases.**
+6. Follow our [Coding Rules](#rules).
+7. Run the full test suite and ensure that all tests passes.
+8. Commit your changes using a descriptive commit message that follows our 
commit message conventions.
+    ``` 
+    $ git commit -a
+    ```
+9. Push your branch to GitHub:
+    ```
+    $ git push origin your-fix-branch
+    ```
+10. In GitHub, send a pull request to `rocketmq-client-nodejs:master`.
+  + If we suggest changes then:
+    - Make the required updates.
+    - Re-run the test suites to ensure tests are still passing.
+
+That's all. Thanks for contributing!
+
+### Coding Rules
+
+To ensure consistency throughout the source code, keep these rules in mind as 
you are working:
+
++ All features or bug fixes must be tested by one or more specs (unit-tests).
++ We follow 
[eslint-config-rocketmq-style](https://www.npmjs.com/package/eslint-config-rocketmq-style)
 for ESLint.
+
+### Commit Message Guidelines
+
+Our commit message is inspired from [Angular's Commit Message 
Format](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines).
+
+#### Commit Message Format
+
+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 72 characters! This allows the 
message to be easier to read on GitHub as well as in various git tools.
+
+The footer should contain a [closing 
reference](https://help.github.com/articles/closing-issues-using-keywords/) to 
an issue if any.
+
+Samples:
+
+```
+chore(package): bump version to 1.0.0.
+
+Close #123
+```
+
+##### Type
+
+Must be one of the following:
+
++ **chore**: Changes that affect the build system or external dependencies 
(example scopes: gulp, broccoli, npm)
++ **ci**: Changes to our CI configuration files and scripts (example scopes: 
Travis, Circle, BrowserStack, SauceLabs)
++ **docs**: Documentation only changes
++ **feat**: A new feature
++ **fix**: A bug fix
++ **perf**: A code change that improves performance
++ **refactor**: A code change that neither fixes a bug nor adds a feature
++ **style**: Changes that do not affect the meaning of the code (white-space, 
formatting, missing semi-colons, etc)
++ **test**: Adding missing tests or correcting existing tests
diff --git a/README.md b/README.md
index e4b3054..b771a20 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,11 @@
 # RocketMQ Client for Node.js
 
+[![Version](http://img.shields.io/npm/v/apache-rocketmq.svg)](https://www.npmjs.com/package/apache-rocketmq)
+[![Downloads](http://img.shields.io/npm/dm/apache-rocketmq.svg)](https://www.npmjs.com/package/apache-rocketmq)
+[![License](https://img.shields.io/npm/l/apache-rocketmq.svg?style=flat)](https://opensource.org/licenses/https://opensource.org/licenses/Apache-2.0)
+[![TravisCI](https://travis-ci.org/apache/rocketmq-client-nodejs.svg)](https://travis-ci.org/apache/rocketmq-client-nodejs)
+[![Dependency](https://david-dm.org/apache/rocketmq-client-nodejs.svg)](https://david-dm.org/apache/rocketmq-client-nodejs)
+
 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.
 
 > **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
 ## License
 
 [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) 
Copyright (C) Apache Software Foundation
-


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to