From 96776b44d73e4695d1ddad07d9104830baa61f11 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 3 May 2023 10:29:14 -0700 Subject: [PATCH] feat: add CONTRIBUTING.md (#312) This is a pared down version of the cli CONTRIBUTING.md --- .gitignore | 1 + CONTRIBUTING.md | 50 ++++++++ lib/content/CONTRIBUTING.md | 48 ++++++++ lib/content/index.js | 1 + .../test/apply/files-snapshots.js.test.cjs | 3 + .../test/apply/source-snapshots.js.test.cjs | 108 ++++++++++++++++++ .../test/check/snapshots.js.test.cjs | 4 + 7 files changed, 215 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 lib/content/CONTRIBUTING.md diff --git a/.gitignore b/.gitignore index 0316d2b7..135c3883 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md +!/CONTRIBUTING.md !/docs/ !/lib/ !/LICENSE* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..69e88788 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,50 @@ + + +# Contributing + +## Code of Conduct + +All interactions in the **npm** organization on GitHub are considered to be covered by our standard [Code of Conduct](https://docs.npmjs.com/policies/conduct). + +## Reporting Bugs + +Before submitting a new bug report please search for an existing or similar report. + +Use one of our existing issue templates if you believe you've come across a unique problem. + +Duplicate issues, or issues that don't use one of our templates may get closed without a response. + +## Pull Request Conventions + +### Commits + +We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). + +When opening a pull request please be sure that either the pull request title, or each commit in the pull request, has one of the following prefixes: + + - `feat`: For when introducing a new feature. The result will be a new semver minor version of the package when it is next published. + - `fix`: For bug fixes. The result will be a new semver patch version of the package when it is next published. + - `docs`: For documentation updates. The result will be a new semver patch version of the package when it is next published. + - `chore`: For changes that do not affect the published module. Often these are changes to tests. The result will be *no* change to the version of the package when it is next published (as the commit does not affect the published version). + +### Test Coverage + +Pull requests made against this repo will run `npm test` automatically. Please make sure tests pass locally before submitting a PR. + +Every new feature or bug fix should come with a corresponding test or tests that validate the solutions. Testing also reports on code coverage and will fail if code coverage drops. + +### Linting + +Linting is also done automatically once tests pass. `npm run lintfix` will fix most linting errors automatically. + +Please make sure linting passes before submitting a PR. + +## What _not_ to contribute? + +### Dependencies + +It should be noted that our team does not accept third-party dependency updates/PRs. If you submit a PR trying to update our dependencies we will close it with or without a reference to these contribution guidelines. + +### Tools/Automation + +Our core team is responsible for the maintenance of the tooling/automation in this project and we ask contributors to not make changes to these when contributing (e.g. `.github/*`, `.eslintrc.json`, `.licensee.json`). Most of those files also have a header at the top to remind folks they are automatically generated. Pull requests that alter these will not be accepted. diff --git a/lib/content/CONTRIBUTING.md b/lib/content/CONTRIBUTING.md new file mode 100644 index 00000000..45aadf5c --- /dev/null +++ b/lib/content/CONTRIBUTING.md @@ -0,0 +1,48 @@ +# Contributing + +## Code of Conduct + +All interactions in the **npm** organization on GitHub are considered to be covered by our standard [Code of Conduct](https://docs.npmjs.com/policies/conduct). + +## Reporting Bugs + +Before submitting a new bug report please search for an existing or similar report. + +Use one of our existing issue templates if you believe you've come across a unique problem. + +Duplicate issues, or issues that don't use one of our templates may get closed without a response. + +## Pull Request Conventions + +### Commits + +We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). + +When opening a pull request please be sure that either the pull request title, or each commit in the pull request, has one of the following prefixes: + + - `feat`: For when introducing a new feature. The result will be a new semver minor version of the package when it is next published. + - `fix`: For bug fixes. The result will be a new semver patch version of the package when it is next published. + - `docs`: For documentation updates. The result will be a new semver patch version of the package when it is next published. + - `chore`: For changes that do not affect the published module. Often these are changes to tests. The result will be *no* change to the version of the package when it is next published (as the commit does not affect the published version). + +### Test Coverage + +Pull requests made against this repo will run `npm test` automatically. Please make sure tests pass locally before submitting a PR. + +Every new feature or bug fix should come with a corresponding test or tests that validate the solutions. Testing also reports on code coverage and will fail if code coverage drops. + +### Linting + +Linting is also done automatically once tests pass. `npm run lintfix` will fix most linting errors automatically. + +Please make sure linting passes before submitting a PR. + +## What _not_ to contribute? + +### Dependencies + +It should be noted that our team does not accept third-party dependency updates/PRs. If you submit a PR trying to update our dependencies we will close it with or without a reference to these contribution guidelines. + +### Tools/Automation + +Our core team is responsible for the maintenance of the tooling/automation in this project and we ask contributors to not make changes to these when contributing (e.g. `.github/*`, `.eslintrc.json`, `.licensee.json`). Most of those files also have a header at the top to remind folks they are automatically generated. Pull requests that alter these will not be accepted. diff --git a/lib/content/index.js b/lib/content/index.js index 01b30e1a..cb572e09 100644 --- a/lib/content/index.js +++ b/lib/content/index.js @@ -90,6 +90,7 @@ const rootModule = { '.npmrc': 'npmrc', 'SECURITY.md': 'SECURITY.md', 'CODE_OF_CONDUCT.md': 'CODE_OF_CONDUCT.md', + 'CONTRIBUTING.md': 'CONTRIBUTING.md', 'package.json': 'pkg.json', }, rm: [ diff --git a/tap-snapshots/test/apply/files-snapshots.js.test.cjs b/tap-snapshots/test/apply/files-snapshots.js.test.cjs index 4c79588e..ef9298fd 100644 --- a/tap-snapshots/test/apply/files-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/files-snapshots.js.test.cjs @@ -27,6 +27,7 @@ exports[`test/apply/files-snapshots.js TAP private workspace > expect resolving .npmrc .release-please-manifest.json CODE_OF_CONDUCT.md +CONTRIBUTING.md package.json release-please-config.json SECURITY.md @@ -83,6 +84,7 @@ exports[`test/apply/files-snapshots.js TAP turn off repo > expect resolving Prom .gitignore .npmrc CODE_OF_CONDUCT.md +CONTRIBUTING.md package.json SECURITY.md ` @@ -111,6 +113,7 @@ exports[`test/apply/files-snapshots.js TAP turn off specific files > expect reso .npmrc .release-please-manifest.json CODE_OF_CONDUCT.md +CONTRIBUTING.md package.json release-please-config.json SECURITY.md diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index 92e96a96..efb62ed0 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -1226,6 +1226,7 @@ jobs: !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md +!/CONTRIBUTING.md !/docs/ !/lib/ !/LICENSE* @@ -1260,6 +1261,59 @@ Conduct](https://docs.npmjs.com/policies/conduct) The npm cli team may, at its own discretion, moderate, remove, or edit any interactions such as pull requests, issues, and comments. +CONTRIBUTING.md +======================================== + + +# Contributing + +## Code of Conduct + +All interactions in the **npm** organization on GitHub are considered to be covered by our standard [Code of Conduct](https://docs.npmjs.com/policies/conduct). + +## Reporting Bugs + +Before submitting a new bug report please search for an existing or similar report. + +Use one of our existing issue templates if you believe you've come across a unique problem. + +Duplicate issues, or issues that don't use one of our templates may get closed without a response. + +## Pull Request Conventions + +### Commits + +We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). + +When opening a pull request please be sure that either the pull request title, or each commit in the pull request, has one of the following prefixes: + + - \`feat\`: For when introducing a new feature. The result will be a new semver minor version of the package when it is next published. + - \`fix\`: For bug fixes. The result will be a new semver patch version of the package when it is next published. + - \`docs\`: For documentation updates. The result will be a new semver patch version of the package when it is next published. + - \`chore\`: For changes that do not affect the published module. Often these are changes to tests. The result will be *no* change to the version of the package when it is next published (as the commit does not affect the published version). + +### Test Coverage + +Pull requests made against this repo will run \`npm test\` automatically. Please make sure tests pass locally before submitting a PR. + +Every new feature or bug fix should come with a corresponding test or tests that validate the solutions. Testing also reports on code coverage and will fail if code coverage drops. + +### Linting + +Linting is also done automatically once tests pass. \`npm run lintfix\` will fix most linting errors automatically. + +Please make sure linting passes before submitting a PR. + +## What _not_ to contribute? + +### Dependencies + +It should be noted that our team does not accept third-party dependency updates/PRs. If you submit a PR trying to update our dependencies we will close it with or without a reference to these contribution guidelines. + +### Tools/Automation + +Our core team is responsible for the maintenance of the tooling/automation in this project and we ask contributors to not make changes to these when contributing (e.g. \`.github/*\`, \`.eslintrc.json\`, \`.licensee.json\`). Most of those files also have a header at the top to remind folks they are automatically generated. Pull requests that alter these will not be accepted. + package.json ======================================== { @@ -2851,6 +2905,7 @@ jobs: !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md +!/CONTRIBUTING.md !/docs/ !/lib/ !/LICENSE* @@ -2891,6 +2946,59 @@ Conduct](https://docs.npmjs.com/policies/conduct) The npm cli team may, at its own discretion, moderate, remove, or edit any interactions such as pull requests, issues, and comments. +CONTRIBUTING.md +======================================== + + +# Contributing + +## Code of Conduct + +All interactions in the **npm** organization on GitHub are considered to be covered by our standard [Code of Conduct](https://docs.npmjs.com/policies/conduct). + +## Reporting Bugs + +Before submitting a new bug report please search for an existing or similar report. + +Use one of our existing issue templates if you believe you've come across a unique problem. + +Duplicate issues, or issues that don't use one of our templates may get closed without a response. + +## Pull Request Conventions + +### Commits + +We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). + +When opening a pull request please be sure that either the pull request title, or each commit in the pull request, has one of the following prefixes: + + - \`feat\`: For when introducing a new feature. The result will be a new semver minor version of the package when it is next published. + - \`fix\`: For bug fixes. The result will be a new semver patch version of the package when it is next published. + - \`docs\`: For documentation updates. The result will be a new semver patch version of the package when it is next published. + - \`chore\`: For changes that do not affect the published module. Often these are changes to tests. The result will be *no* change to the version of the package when it is next published (as the commit does not affect the published version). + +### Test Coverage + +Pull requests made against this repo will run \`npm test\` automatically. Please make sure tests pass locally before submitting a PR. + +Every new feature or bug fix should come with a corresponding test or tests that validate the solutions. Testing also reports on code coverage and will fail if code coverage drops. + +### Linting + +Linting is also done automatically once tests pass. \`npm run lintfix\` will fix most linting errors automatically. + +Please make sure linting passes before submitting a PR. + +## What _not_ to contribute? + +### Dependencies + +It should be noted that our team does not accept third-party dependency updates/PRs. If you submit a PR trying to update our dependencies we will close it with or without a reference to these contribution guidelines. + +### Tools/Automation + +Our core team is responsible for the maintenance of the tooling/automation in this project and we ask contributors to not make changes to these when contributing (e.g. \`.github/*\`, \`.eslintrc.json\`, \`.licensee.json\`). Most of those files also have a header at the top to remind folks they are automatically generated. Pull requests that alter these will not be accepted. + package.json ======================================== { diff --git a/tap-snapshots/test/check/snapshots.js.test.cjs b/tap-snapshots/test/check/snapshots.js.test.cjs index bcd9db8b..c7bdff3f 100644 --- a/tap-snapshots/test/check/snapshots.js.test.cjs +++ b/tap-snapshots/test/check/snapshots.js.test.cjs @@ -56,6 +56,7 @@ The following module files need to be added: .gitignore .npmrc CODE_OF_CONDUCT.md + CONTRIBUTING.md SECURITY.md To correct it: npx template-oss-apply --force @@ -133,6 +134,7 @@ To correct it: move files to not match one of the following patterns: !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md + !/CONTRIBUTING.md !/docs/ !/lib/ !/LICENSE* @@ -171,6 +173,7 @@ To correct it: move files to not match one of the following patterns: !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md + !/CONTRIBUTING.md !/docs/ !/lib/ !/LICENSE* @@ -304,6 +307,7 @@ The following module files need to be added: .gitignore .npmrc CODE_OF_CONDUCT.md + CONTRIBUTING.md SECURITY.md To correct it: npx template-oss-apply --force