From e92a7b3e334019a96a1b3873a7cb69b602349050 Mon Sep 17 00:00:00 2001 From: Andre Staltz Date: Mon, 7 Mar 2016 14:43:46 +0200 Subject: [PATCH] docs(CONTRIBUTING): add GitHub Issue and PR template Also about checklist to include new operators Fixes issues #1355 and #1429 --- .github/ISSUE_TEMPLATE.md | 21 +++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 18 ++++++++++++++++++ doc/operator-creation.md | 15 ++++++++++++++- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..784360ed --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,21 @@ + + +**RxJS version:** + +**Code to reproduce:** + +**Expected behavior:** + +**Actual behavior:** + +**Additional information:** diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..e293fb94 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,18 @@ + + +**Description:** + +**Related issue (if exists):** diff --git a/doc/operator-creation.md b/doc/operator-creation.md index 501f313d..542a2db1 100644 --- a/doc/operator-creation.md +++ b/doc/operator-creation.md @@ -128,7 +128,20 @@ There are a few things to know and (try to) understand while developing operator the shared underlying subscription. - When you `subscribe` to an Observable, the functions or Observer you passed are used to create the final `destination` `Subscriber` for the chain. It's this `Subscriber` that is really also the shared `Subscriptoin` for the operator chain. - + +### Submitting a PR for an Operator + +Please complete these steps for each new operator added to RxJS as a pull request: + +- Add the operator to either Core or KitchenSink +- It must have a `-spec.ts` tests file covering the canonical corner cases, with marble diagram tests +- If possible, write a `asDiagram` test case too, for PNG diagram generation purposes +- The spec file should have a type definition test at the end of the spec to verify type definition for various use cases +- The operator must be documented in JSDoc style in the implementation file, including also the PNG marble diagram image +- The operator should be listed in `doc/operators.md` in a category of operators +- It should also be inserted in the operator decision tree file `doc/decision-tree-widget/tree.yml` +- You may need to update `MIGRATION.md` if the operator differs from the corresponding one in RxJS v4 + ### Inner Subscriptions An "inner subscriber" or "inner subscription" is any subscription created inside of an operator's primary Subscriber. For example,