From 7883d7c05f549a70a0e0f3d962e29a446b0493bb Mon Sep 17 00:00:00 2001 From: t <28008958+taeh98@users.noreply.github.com> Date: Mon, 2 Oct 2023 22:23:37 +0100 Subject: [PATCH] chore: added templates etc to enable contributions --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 174 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 110 +++++++++++++ .github/ISSUE_TEMPLATE/QUESTION_OR_HELP.md | 149 ++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 + .github/PULL_REQUEST_TEMPLATE.md | 118 ++++++++++++++ CONTRIBUTING.md | 146 +++++++++++++++++ README.md | 45 +----- 7 files changed, 713 insertions(+), 37 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/BUG_REPORT.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md create mode 100644 .github/ISSUE_TEMPLATE/QUESTION_OR_HELP.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 0000000..ee5a2c5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,174 @@ +--- +name: "๐Ÿ› Bug Report" +about: Report a bug in the library. +title: 'Bug: ' +labels: [ 'bug report' ] +--- + + + +## โœ… Checklist + +- [ ] I have searched + through [this library's GitHub issues](https://github.com/hossein-zare/react-native-dropdown-picker/issues) + and am satisfied that this bug report is not a duplicate +- [ ] I have checked that my bug is present + in [the latest version of this library](https://www.npmjs.com/package/react-native-dropdown-picker) +- [ ] I have + searched [this library's GitHub issues](https://github.com/hossein-zare/react-native-dropdown-picker/issues) + and [this library's docs](https://hossein-zare.github.io/react-native-dropdown-picker-website/docs) + and am satisfied that this is indeed a bug rather than simply something I + don't know how to do (if so, make a question/help issue instead) +- [ ] My bug comes from this library and not others, e.g. React Native or + another dependency in my project +- [ ] I understand that each bug should be submitted in its own issue. + Therefore, this issue will contain only one bug, and I will submit any + different bugs in their own, separate issues + +## ๐Ÿค” Summary + + + +## โš ๏ธ The problem + +### Desired (expected, correct) behaviour + + + +### Actual (unexpected, incorrect) behaviour + + + +### Screenshots/screen recording + + + +### Conditions + + + +### Code + + + +### Log/error output + + + +## ๐Ÿ’ป Environment + +### react-native-dropdown-picker version + + + +### Node and npm versions + + + +### React, React Native, and Expo versions + + + +### Package.json contents + + + +### Platform/s + + + +### JavaScript or TypeScript + + + +### Class component or function component + + + +## ๐Ÿ” Reproducing the bug + +### Steps To Reproduce + +1. Do this +2. Then this +3. .... +4. Bug appears + + + +### Minimal reproducible example + + + +Link to minimal reproducible example: + +## ๐Ÿ Final details + +### Steps to fix + + + +### Additional context/info + + diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 0000000..f20c527 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,110 @@ +--- +name: "๐Ÿš€ Feature request" +about: Request a new feature to be added to this library. +title: 'Feature request: ' +labels: [ 'feature request' ] +--- + + + +## โœ… Checklist + +- [ ] I have searched + through [this library's GitHub issues](https://github.com/hossein-zare/react-native-dropdown-picker/issues) + and am satisfied that this feature request is not a duplicate +- [ ] I have searched + through [this library's GitHub issues](https://github.com/hossein-zare/react-native-dropdown-picker/issues) + and + read [this library's docs](https://hossein-zare.github.io/react-native-dropdown-picker-website) + and am satisfied that this feature request is not implemented in the most + recent version of the library +- [ ] I understand that each feature request should be submitted in its own + issue. Therefore, this issue will contain only one feature request, and I will + submit any different feature requests in their own, separate issues + +## ๐Ÿค” Overview + +### Summary + + + +### User story + + + +## ๐Ÿ’ก Details + +### What + + + +### Who + + + +### When + + + +### Why + + + +### How + + + +## ๐Ÿ Final details + +### Similar/same functionality elsewhere + + + +### Possible alternatives + + + +### Additional context/info + + diff --git a/.github/ISSUE_TEMPLATE/QUESTION_OR_HELP.md b/.github/ISSUE_TEMPLATE/QUESTION_OR_HELP.md new file mode 100644 index 0000000..454d67b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/QUESTION_OR_HELP.md @@ -0,0 +1,149 @@ +--- +name: "โ“ Question or help" +about: Ask a question or for help using the library. +title: 'Question/help: ' +labels: [ 'help needed' ] +--- + + + +## โœ… Checklist + +- [ ] I have searched through + the [other issues for this library](https://github.com/hossein-zare/react-native-dropdown-picker/issues) + and am satisfied that my problem is not a duplicate. +- [ ] I have checked and + read [this library's docs](https://hossein-zare.github.io/react-native-dropdown-picker-website) + to try and resolve my problem by myself +- [ ] I have checked and + read [this library's GitHub issues](https://github.com/hossein-zare/react-native-dropdown-picker/issues) + to try and resolve my problem by myself +- [ ] I have checked and + read [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-dropdown-picker) + to try and resolve my problem by myself +- [ ] My problem relates to this library and not others, e.g. React Native or + another dependency in my project +- [ ] I understand that each question/problem should be submitted in its own + issue. Therefore, this issue will contain only one such problem, and I will + submit any different problems in their own, separate issues + +### Relevant docs pages + + + +### Relevant issues + + + +### Relevant Stack Overflow questions + + + +## ๐Ÿค” Summary + +### Overview + + + +### User story + + + +## โš ๏ธ The problem + +### What I need help with + + + +### Code + + + +### Log/error output + + + +### Screenshots + + + +## ๐Ÿ’ป Environment + +### react-native-dropdown-picker version + + + +### Node and npm versions + + + +### React, React Native, and Expo versions + + + +### Package.json contents + + + +### Platform/s + + + +### JavaScript or TypeScript + + + +### Class component or function component + + + +## ๐Ÿ Additional context/info + + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..576316e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +--- +blank_issues_enabled: false +contact_links: + - name: ๐Ÿ“ƒ Documentation Issue + url: https://github.com/hossein-zare/react-native-dropdown-picker-website + about: > + If this library's docs are incorrect or are missing something, + please file an issue here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..d2605c4 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,118 @@ + + +## โœ… Checklist + + + +- [ ] I have + followed [the contributing guidance](https://github.com/hossein-zare/react-native-dropdown-picker/blob/dev-5.x/CONTRIBUTING.md). +- [ ] I have + read [this library's docs](https://hossein-zare.github.io/react-native-dropdown-picker-website/docs), + and it is still sensible to make these changes +- [ ] I have + read [this library's GitHub issues](https://github.com/hossein-zare/react-native-dropdown-picker/issues), + and it is still sensible to make these changes +- [ ] + I [made an issue](https://github.com/hossein-zare/react-native-dropdown-picker/issues) + for the new feature/bug fix/etc this PR implements +- [ ] + This [PR is linked to its relevant issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) +- [ ] I + have [tested my changes and this library as a whole with npm pack](https://dev.to/scooperdev/use-npm-pack-to-test-your-packages-locally-486e), + and everything works +- [ ] My changes pass all the + repo's [CI/status checks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks), + including the Prettier and ESLint checks +- [ ] I + have [squashed all my changes into one commit](https://www.geeksforgeeks.org/git-squash/) +- [ ] My single commit message conforms + to [the Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/#summary) +- [ ] I added/changed automated tests to ensure my feature works correctly and + continues to do so +- [ ] I + have [kept my changes up-to-date with those in the `dev-5.x` (default) branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch) +- [ ] My changes do not require changing this library's docs: they are + up-to-date and comprehensive even with my changes +- [ ] My changes require this library's docs to be updated and/or completed to + include all relevant and up-to-date information +- [ ] I have made a separate PR + in [the docs repo](https://github.com/hossein-zare/react-native-dropdown-picker-website) + to update them in light of this PR +- [ ] I understand that each atomic change (e.g. fixing one bug or adding one + feature) should be submitted in its own PR. Therefore, this PR will contain + only one such atomic change, and I will submit any different changes in their + own, separate PRs + +## ๐Ÿ‘€ Relevant issue(s) + + + +- Fixes bug # +- Implements feature request # +- Fixes bug # + +## ๐Ÿš€๏ธ Changes made + +### What + + + +### Why + + + +### How + + + +### Tests + + + +## ๐Ÿ Final details + +### Relevant docs pages + + + +### Help required + + + +### Additional context/info + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ba250f0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,146 @@ +# ๐Ÿ’– Contributing to [React Native Dropdown Picker](https://github.com/hossein-zare/react-native-dropdown-picker) + +Thank you for considering contributing to this library! This guide will walk you +through how to do so successfully ๐Ÿ˜ƒ + +## ๐Ÿค” Overview + +### ๐ŸŒ General guidance + +You should +read [GitHub's general guidance on contributing to projects](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) +and [guidance on collaborating with pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests). + +### ๐Ÿ“„ Documentation + +Good and thorough documentation is important to enabling people to use a +library. Therefore, it would be greatly appreciated if +you [contributed to this library's documentation](https://github.com/hossein-zare/react-native-dropdown-picker-website). + +### ๐Ÿงช Experimenting + +To easily and quickly test changes before needing to add them to version +control or submit them for acceptance into this library, you can +use [patch-package](https://www.npmjs.com/package/patch-package). It will let +you edit this library in your own project's npm dependencies to see which +changes work. + +## ๐Ÿ› ๏ธ How to contribute changes + +### โœ… Sensibility + +Read [this library's docs](https://hossein-zare.github.io/react-native-dropdown-picker-website/docs) +and +search [its GitHub issues](https://github.com/hossein-zare/react-native-dropdown-picker/issues) +to ensure your intended changes make sense. + +### ๐Ÿšฉ Make an issue + +Before submitting any changes, document them +in [an issue](https://github.com/hossein-zare/react-native-dropdown-picker/issues/new/choose). +For example, this might be a feature request issue for the feature you will +create or a bug report for the bug you will fix. If the issue already exists, +e.g. a bug report for the same bug you'll fix or a feature request for the same +feature you're building, skip this step. Don't make a duplicate issue. + +### ๐Ÿด Forking + +To start work on your changes to be +submitted, [fork and clone](https://docs.github.com/en/get-started/quickstart/fork-a-repo) +this library. You should +then [create a new branch](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging) +on your fork dedicated to the changes you're making. You should +read [GitHub's docs about branches](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches). +Make sure you use a separate branch (โ‡’ PR) for each atomic change (e.g. adding +one feature or fixing one bug) you are making. If you want to make multiple, do +so in separate branches, and submit them in separate PRs. Otherwise, your PRs +will bloat, and it will be hard to review, manage, and keep track of them. + +### ๐Ÿ‘ฉ๐Ÿพโ€๐Ÿ’ป Make changes + +Make the changes you require to this library in your fork. Test them +with `npm pack`. It will let you build this library as if for release on npm +locally, so you can include it as a dependency in another npm package to test +it. +Read [this article](https://dev.to/scooperdev/use-npm-pack-to-test-your-packages-locally-486e) +for more information on how to use `npm pack` to test your changed version of +this library locally. + +Once you have ensured your changes work as +required, [commit your changes](https://git-scm.com/docs/git-commit) +and [push them to your fork](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository). +Then ensure that your changes pass +our [continuous integration (CI) workflow](https://docs.github.com/en/actions/automating-builds-and-tests/about-continuous-integration). +They will show up to you +as [status checks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks). +To do this, you may need +to [fix ESLint issues](https://eslint.org/docs/latest/use/command-line-interface#--fix) +and [reformat your code with Prettier](https://prettier.io/docs/en/cli#--write). + +Use the script `update_reformat.sh` to automatically update this library's +dependencies and reformat its code. This will help you pass our CI checks. + +Whenever applicable, add or update automated tests to check your changes work +and that they will continue to do so in the future. You +should [squash the commits you made](https://www.geeksforgeeks.org/git-squash/) +containing your changes into one single commit that conforms +to [the Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/#summary). + +Ensure your changes are up-to-date with those in the `dev-5.x` (default) branch. +This will mean your commit will come immediately after the last one in +the `dev-5.x` (default) branch if you +run [git log](https://git-scm.com/docs/git-log). +Read [GitHub's guidance on keeping your pull request in sync with the base branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch). +Doing this will prevent merge conflicts that will stop your changes being able +to be merged. + +Once you've done all this, you're ready to submit a Pull Request (PR). + +### ๐Ÿš€ Make a Pull Request + +To submit your changes for review and to have them added to this library, you +must make +a [pull request (PR)](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests). +You will be ready to do so after following the instructions in the "Make +changes" section. + +You can make a PR into this +library [here](https://github.com/hossein-zare/react-native-dropdown-picker/compare). +Ensure +you [link the issue you made earlier (and any others that are relevant) to your PR](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#manually-linking-a-pull-request-to-an-issue-using-the-pull-request-sidebar). + +PRs should be made against and merged into +the [`dev-5.x`](https://github.com/hossein-zare/react-native-dropdown-picker) +branch, which is set as the `default` branch on GitHub. + +You can also make +a [draft PR](https://github.blog/2019-02-14-introducing-draft-pull-requests/) +before the changes are completely finished as per the "Make changes" section. +This might be useful if you need feedback on your changes early on and before +finalizing for merging. + +Once you have made a PR, you will then get feedback from the maintainers of the +repo. This will help ensure your changes are ready to be merged. + +If required, make a separate +PR [in the docs](https://github.com/hossein-zare/react-native-dropdown-picker-website) +if your changes make its contents incorrect or if information regarding your +changes is missing from them altogether. + +## ๐Ÿ Release process + +Releases are currently made from +the [`5.x`](https://github.com/hossein-zare/react-native-dropdown-picker/tree/5.x) +branch. To make a new release, follow these steps: + +1. Verify the development branch has all the changes desired in the release and + works well +2. Make and merge a final PR into the development branch that increments the + version number in `package.json` +3. Make and merge a PR from the development branch to the release branch +4. Using the GitHub web UI, draft a new release using the tag name `vx.x.x` + (replace the `x` values as appropriate). Use the release branch as the + target, with the release name being `vx.x.x` (again, with appropriate + numbers in place of `x`) +5. Verify in the GitHub Actions panel for the repository that `npm publish` + succeeded diff --git a/README.md b/README.md index 91b0a73..4ac7c93 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![GitHub repo](https://img.shields.io/badge/GitHub_repo-grey?logo=github)](https://github.com/hossein-zare/react-native-dropdown-picker) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fhossein-zare%2Freact-native-dropdown-picker%2Fbadge%3Fref%3Ddev-5.x&style=flat)](https://actions-badge.atrox.dev/hossein-zare/react-native-dropdown-picker/goto?ref=dev-5.x) +[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](https://github.com/hossein-zare/react-native-dropdown-picker/blob/dev-5.x/CONTRIBUTING.md) [![react-native-dropdown-picker is released under the MIT license.](https://img.shields.io/github/license/hossein-zare/react-native-dropdown-picker)](https://github.com/hossein-zare/react-native-dropdown-picker/blob/dev-5.x/LICENSE) [![Current npm package version.](https://img.shields.io/npm/v/react-native-dropdown-picker?color=brightgreen&label=npm%20package)](https://www.npmjs.org/package/react-native-dropdown-picker) [![Weekly npm downloads](https://img.shields.io/npm/dw/react-native-dropdown-picker)](https://www.npmjs.org/package/react-native-dropdown-picker) @@ -90,43 +91,13 @@ at: [https://hossein-zare.github.io/react-native-dropdown-picker-website](https: The docs can be edited at: [https://github.com/hossein-zare/react-native-dropdown-picker-website](https://github.com/hossein-zare/react-native-dropdown-picker-website) -## Merge and Release Process +## ๐Ÿ˜• Support and issues -### Branches in use +If you have questions or need help, you +can [ask a question on Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-dropdown-picker) +or [make a GitHub issue](https://github.com/hossein-zare/react-native-dropdown-picker/issues/new/choose). +You can also make a GitHub issue to report a bug or make a feature request. -#### Development +## ๐Ÿš€๏ธ Contributing -PRs should be made against and merged into -the [`dev-5.x`](https://github.com/hossein-zare/react-native-dropdown-picker) -branch, which is set as the `default` branch on GitHub. - -#### Release - -Releases are currently made from -the [`5.x`](https://github.com/hossein-zare/react-native-dropdown-picker/tree/5.x) -branch. - -### Release Process - -To make a new release, follow these steps: - -* Verify the development branch has all the changes desired in the release and - works well -* You can test changes to this library and experiment easily - with [patch-package](https://www.npmjs.com/package/patch-package) -* Once you have made changes, and after finalizing them, use `npm pack` - to [test your new, changed version of this library locally and check it works correctly](https://dev.to/scooperdev/use-npm-pack-to-test-your-packages-locally-486e) -* Make and merge a final PR into the development branch that increments the - version number in `package.json` -* Make and merge a PR from the development branch to the release branch -* Using the GitHub web UI, draft a new release using the tag name `vx.x.x` - (replace the `x` values as appropriate). Use the release branch as the - target, with the release name being `vx.x.x` (again, with appropriate - numbers in place of `x`) -* Verify in the GitHub Actions panel for the repository that `npm publish` - succeeded - -[//]: # (TODO: make templates for pull requests and issues, and CONTRIBUTING.md - include check people read docs and past issues before submitting new issues - ensure PRs tested with npm pack: https://dev.to/scooperdev/use-npm-pack-to-test-your-packages-locally-486e -) +See [CONTRIBUTING.md](https://github.com/hossein-zare/react-native-dropdown-picker/blob/dev-5.x/CONTRIBUTING.md).