diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..0c28e539 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,101 @@ +name: ⚠️ Bug Report +description: + Report a bug with existing React Query Firebase features +title: "" +labels: ["Needs Attention", "type: bug"] +body: + - type: checkboxes + attributes: + label: Is there an existing issue for this? + description: | + Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues. + required: true + + - type: markdown + attributes: + value: | + --- + + - type: dropdown + id: platforms + attributes: + label: Which platforms are affected? + multiple: true + options: + - Android + - iOS + - macOS + - Web + - Windows + + - type: markdown + attributes: + value: | + --- + + - type: textarea + attributes: + label: Description + description: | + Describe the issue. Explain what you _expected_ to happen and what + _actually_ happened. + validations: + required: true + + - type: textarea + attributes: + label: Reproducing the issue + description: | + Please provide either **steps to reproduce** or a [**minimal reproducible example**](https://stackoverflow.com/help/minimal-reproducible-example). + Providing a minimal reproducible example will help us triage your issue + faster. + validations: + required: true + + - type: markdown + attributes: + value: | + --- + + - type: input + attributes: + label: Firebase version + description: What version of `firebase` has this issue? + placeholder: "10.x.x" + validations: + required: true + + - type: input + attributes: + label: TanStack Query Version + description: What version of TanStack Query is being used? + placeholder: "v5" + validations: + required: true + + - type: markdown + attributes: + value: | + --- + + - type: textarea + attributes: + label: Relevant Log Output + description: | + Please copy and paste any relevant log output. + placeholder: | + Paste your logs here. Please redact any personally identifiable + information. This will be automatically formatted into code, so no + need for backticks. + render: shell + validations: + required: false + + - type: textarea + id: comments + attributes: + label: Additional context and comments + description: | + Anything else you want to add for this issue? \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 00000000..3ba13e0c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/documentation-feedback.md b/.github/ISSUE_TEMPLATE/documentation-feedback.md new file mode 100644 index 00000000..4e840686 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation-feedback.md @@ -0,0 +1,10 @@ +--- +name: "\U0001F4DA Documentation Feedback" +about: Report an issue with the https://react-query-firebase.invertase.dev/ documentation or suggest an improvement. +title: "[\U0001F4DA] Your documentation feedback title (CHANGE ME)" +labels: 'good first issue, type: documentation' +assignees: '' + +--- + +Please describe your documentation issue or suggested improvement in detail here and provide links to any pre-existing/relevant documentation and screenshots if necessary: \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 00000000..da2956cd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,12 @@ +--- +name: "🚀Feature Request" +about: Make a feature request for React Query Firebase. +title: "Your feature request title here" +labels: 'Needs Attention, type: enhancement' +assignees: '' + +--- + +## What feature would you like to see? + +Is there a missing a feature that is supported on an underlying SDK? Or is there a feature that you think would be useful to have in React Query Firebase? \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..775bd526 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,29 @@ +## Description + +*Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change.* + +## Related Issues + +*Replace this paragraph with a list of issues related to this PR from the [issue database]. Indicate, which of these issues are resolved or fixed by this PR. + +## Checklist + +Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). +This will ensure a smooth and quick review process. + +- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. +- [ ] My PR includes unit or integration tests for *all* changed/updated/fixed behaviors (See [Contributor Guide]). +- [ ] All existing and new tests are passing. +- [ ] I updated/added relevant documentation. +- [ ] I am willing to follow-up on review comments in a timely manner. + +## Breaking Change + +Does your PR require plugin users to manually update their apps to accommodate your change? + +- [ ] Yes, this is a breaking change. +- [ ] No, this is *not* a breaking change. + + +[issue database]: https://github.com/invertase/react-query-firebase/issues +[Contributor Guide]: https://github.com/invertase/react-query-firebase/blob/main/CONTRIBUTING.md diff --git a/.github/workflows/pr_title_validation.yaml b/.github/workflows/pr_title_validation.yaml new file mode 100644 index 00000000..3b9f9346 --- /dev/null +++ b/.github/workflows/pr_title_validation.yaml @@ -0,0 +1,30 @@ +name: "PR Title is Conventional" + +on: + pull_request: + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + build + chore + ci + docs + feat + fix + perf + refactor + revert + style + test + subjectPattern: ^[A-Z].+$ + subjectPatternError: | + The subject of the PR must begin with an uppercase letter. + \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..27144fe6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,109 @@ +# Contribution Guidelines + +**Note:** If these contribution guidelines are not followed your issue or PR might be closed, so +please read these instructions carefully. + +_See also: [the Invertase code of conduct](https://github.com/invertase/meta/blob/main/CODE_OF_CONDUCT.md)_ + +## About + +React Query Firebase provides a set of easy to use hooks for handling asynchronous tasks with Firebase in your React application. + + +## Contribution types + +### Bug Report + +- If you find a bug, please first report it using [GitHub issues](https://github.com/invertase/react-query-firebase/issues/new?assignees=&labels=bug%2Ctriage&template=bug_report.yml). + - First check if there is not already an issue for it; duplicated issues will be closed. + +### Bug Fix + +- If you'd like to submit a fix for a bug, please read the [How To](#how-to-contribute) for how to send a pull request. +- Indicate on the open issue that you are working on fixing the bug and the issue will be assigned to you. +- Include a test that isolates the bug and verifies that it was fixed. + +### New Features + +- If you'd like to add a feature to the library that doesn't already exist, feel free to describe the feature in a new [GitHub issue](https://github.com/invertase/react-query-firebase/issues/new?assignees=&labels=feature+request%2Ctriage&template=feature-request.md). +- If you'd like to implement the new feature, please wait for feedback from the project maintainers before spending too much time writing the code. In some cases, enhancements may not align well with the project future development direction. +- If applicable, implement the code for the new feature and please read the [How To](#how-to-contribute). + +### Documentation & Miscellaneous + +- If you have suggestions for improvements to the documentation or examples (or something else), we would love to hear about it. +- As always first file a [GitHub issue](https://github.com/invertase/react-query-firebase/issues/new?assignees=&labels=feature+request%2Ctriage&template=documentation-feedback.md). +- Implement the changes to the documentation, please read the [How To](#how-to-contribute). + + +## How To Contribute + +### 1. Things you will need + +- Linux, Mac OS X, or Windows. +- [git](https://git-scm.com) (used for source version control). +- An ssh client (used to authenticate with GitHub). +- An IDE such as [Visual Studio Code](https://code.visualstudio.com/). + +### 2. Forking & cloning the repository + +- Ensure all the dependencies described in the previous section are installed. +- Fork `https://github.com/invertase/react-query-firebase` into your own GitHub account. If + you already have a fork, and are now installing a development environment on + a new machine, make sure you've updated your fork so that you don't use stale + configuration options from long ago. +- `git clone git@github.com:/react-query-firebase.git` +- `git remote add upstream git@github.com:invertase/react-query-firebase.git` (So that you + fetch from the main repository, not your clone, when running `git fetch` + et al.) + +### 3. Performing changes + +We gladly accept contributions via GitHub pull requests. + +keep the code consistent and avoid common pitfalls. + +To start working on a patch: + +1. `git fetch upstream` +2. `git checkout upstream/main -b ` +3. Hack away! + +Once you have made your changes, ensure that it passes the testing & formatting checks. + +Assuming all is successful, commit and push your code: + +1. `git commit -a -m ""` +2. `git push origin ` + +To send us a pull request: + +- `git pull-request` (if you are using [Hub](http://github.com/github/hub/)) or + go to `https://github.com/invertase/react-query-firebase` and click the + "Compare & pull request" button + +Please make sure all your check-ins have detailed commit messages explaining the patch. + +When naming the title of your pull request, please follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) +guide. + +Tests are run automatically on contributions using GitHub Actions. Depending on +your code contributions, various tests will be run against your updated code automatically. + +Once you've gotten an LGTM from a project maintainer and once your PR has received +the green light from all our automated testing, wait for one the package maintainers +to merge the pull request. + +### The review process + +Newly opened PRs first go through initial triage which results in one of: + +- **Merging the PR** - if the PR can be quickly reviewed and looks good. +- **Closing the PR** - if the PR maintainer decides that the PR should not be merged. +- **Moving the PR to the backlog** - if the review requires non trivial effort and the issue isn't a priority; in this case the maintainer will: + - Add the `backlog` label to the issue. + - Leave a comment on the PR explaining that the review is not trivial and that the issue will be looked at according to priority order. +- **Starting a non trivial review** - if the review requires non trivial effort and the issue is a priority; in this case the maintainer will: + - Add the "in review" label to the issue. + - Self assign the PR. + \ No newline at end of file