Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Prepare OSS #98

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: ⚠️ Bug Report
description:
Report a bug with existing React Query Firebase features
title: "<YOUR TITLE HERE>"
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this one

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?
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-feedback.md
Original file line number Diff line number Diff line change
@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong url

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:
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -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?
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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.

<!-- Links -->
[issue database]: https://github.com/invertase/react-query-firebase/issues
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong urls

[Contributor Guide]: https://github.com/invertase/react-query-firebase/blob/main/CONTRIBUTING.md
30 changes: 30 additions & 0 deletions .github/workflows/pr_title_validation.yaml
Original file line number Diff line number Diff line change
@@ -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.

109 changes: 109 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url

- 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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url

- 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url

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 [email protected]:<your_name_here>/react-query-firebase.git`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url

- `git remote add upstream [email protected]:invertase/react-query-firebase.git` (So that you
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url

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 <name_of_your_branch>`
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 "<your informative commit message>"`
2. `git push origin <name_of_your_branch>`

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.