From b0d1b7b5680cbd9a43a1e74773e2e5889fdbfb21 Mon Sep 17 00:00:00 2001 From: Anthony Nandaa Date: Tue, 2 Oct 2018 07:43:23 +0300 Subject: [PATCH] chore(maintenance): add project guides (#36) - issue template - PR template - contributing guide - maintainers guide closes #35 --- .github/ISSUE_TEMPLATE.md | 18 +++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 15 +++++++++ CONTRIBUTING.md | 53 ++++++++++++++++++++++++++++++++ MAINTAINERS_GUIDE.md | 8 +++++ README.md | 6 +++- 5 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CONTRIBUTING.md create mode 100644 MAINTAINERS_GUIDE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..d8f9d903 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,18 @@ + + +* **Version**: +* **Platform**: + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..251a03d2 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,15 @@ + + +##### Checklist + +- [ ] `npm test`, tests passing +- [ ] `npm run test:snap` (to update the snapshot) +- [ ] tests and/or benchmarks are included +- [ ] documentation is changed or added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..60d8b624 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# Contributing to `c8` + +The `c8` project welcomes all contributions from anyone willing to work in good faith with other contributors and the community. No contribution is too small and all contributions are valued. + +## Issues + +- You can open [issues here](https://github.com/bcoe/c8/issues), please follow the template guide. +- You can join the `node-tooling/c8` channel, [follow this link](https://devtoolscommunity.herokuapp.com/) to request for an invite. + +## Pull Requests + +Pull Requests are the way concrete changes are made to the code, documentation, dependencies, and tools contained in the `c8` repository. + +### Setting up your local environment + +1. Make sure you have installed the latest version of Node.js +1. Fork this project on Github and clone your fork locally: + ``` + $ git clone git@github.com:username/c8.git + $ cd c8 + $ git remote add upstream https://github.com/bcoe/c8.git + $ git fetch upstream + ``` +1. Create local branches to work within. These should also be created directly off of the master branch: + ``` + $ git checkout -b my-branch -t upstream/master + ``` +1. Make your changes +1. Run tests to make sure all is okay (everything should pass except snapshot): + ``` + $ npm test + ``` +1. Now update the snapshot + ``` + $ npm run test:snap + ``` +2. If all is passing, commit your changes. +3. As a best practice, once you have committed your changes, it is a good idea to use git rebase (not git merge) to synchronize your work with the main repository: + ``` + $ git fetch upstream + $ git rebase upstream/master + ``` +1. Run tests again to make sure all is okay +1. Push: + ``` + $ npm test + ``` +1. Open the pull request, see details in the template. +1. Make any necessary changes after review. + +## Note + +This guide is adapted from the [Node.js project](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#dependencies), check it out for more details. diff --git a/MAINTAINERS_GUIDE.md b/MAINTAINERS_GUIDE.md new file mode 100644 index 00000000..1c34b652 --- /dev/null +++ b/MAINTAINERS_GUIDE.md @@ -0,0 +1,8 @@ +# `c8` Maintainers Guide + +- Label the issues appropriately, see the list of labels and their description [here](https://github.com/bcoe/c8/labels) +- Be welcoming to first-time contributors, identified by the GitHub `first-time contributor` badge. +- At least 1 - 2 _collaborators_ must approve a pull request before the pull request lands. +- PRs with commits that don't follow the [conventional commits standard](https://www.conventionalcommits.org) should be re-written when merging (squash and merge). +- Use Github's _squash and merge_ when landing PRs. +- CI must pass before landing PRs. diff --git a/README.md b/README.md index ef752108..474dbf01 100644 --- a/README.md +++ b/README.md @@ -32,4 +32,8 @@ A fully functional code coverage solution using only V8's native coverage features and minimal user-land modules, so that we fit these constraints: * No parsing of JavaScript code. -* No mucking with Node.js' runtime environment. \ No newline at end of file +* No mucking with Node.js' runtime environment. + +## Contributing to `c8` + +See the [contributing guide here](./CONTRIBUTING.md).