Skip to content

Commit 4c0daca

Browse files
authored
Merge pull request #1532 from OneSignal/user_model_beta2/observer_updates
[User Model] Notification permission and PushSubscription observer updates
2 parents be6676e + 980b458 commit 4c0daca

35 files changed

+1241
-1224
lines changed

.github/ISSUE_TEMPLATE/ask-question.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🙋‍♂️ Ask a question
22
description: Tell us what's on your mind
3-
title: "[question]: "
4-
labels: ["question"]
3+
title: '[question]: '
4+
labels: ['question']
55
# assignees:
66
# - OneSignal/ios-sdk
77
body:

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🪳 Bug report
22
description: File a bug report
3-
title: "[Bug]: "
4-
labels: ["bug", "triage"]
3+
title: '[Bug]: '
4+
labels: ['bug', 'triage']
55
# assignees:
66
# - OneSignal/ios-sdk
77
body:

.github/ISSUE_TEMPLATE/general-feedback.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 📣 General feedback
22
description: Tell us what's on your mind
3-
title: "[Feedback]: "
4-
labels: ["triage"]
3+
title: '[Feedback]: '
4+
labels: ['triage']
55
# assignees:
66
# - OneSignal/ios-sdk
77
body:

.github/pull_request_template.md

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,75 @@
11
<!-- START -->
2+
23
# READ AND DELETE THIS SECTION BEFORE SUBMITTING PR
3-
* **Fill out each _REQUIRED_ section**
4-
* **Fill out _OPTIONAL_ sections, remove section if it doesn't apply to your PR**
5-
* **Read and fill out each of the checklists below**
6-
* **Remove this section after reading**
4+
5+
- **Fill out each _REQUIRED_ section**
6+
- **Fill out _OPTIONAL_ sections, remove section if it doesn't apply to your PR**
7+
- **Read and fill out each of the checklists below**
8+
- **Remove this section after reading**
79
<!-- END -->
810

911
# Description
12+
1013
## One Line Summary
14+
1115
**REQUIRED** - Very short description that summaries the changes in this PR.
1216

1317
## Details
1418

1519
### Motivation
20+
1621
**REQUIRED -** Why is this code change being made? Or what is the goal of this PR? Examples: Fixes a specific bug, provides additional logging to debug future issues, feature to allow X.
1722

1823
### Scope
24+
1925
**RECOMMEND - OPTIONAL -** What is intended to be effected. What is known not to change. Example: Notifications are grouped when parameter X is set, not enabled by default.
2026

2127
### OPTIONAL - Other
28+
2229
**OPTIONAL -** Feel free to add any other sections or sub-sections that can explain your PR better.
2330

2431
# Testing
32+
2533
## Unit testing
26-
**OPTIONAL -** Explain unit tests added, if not clear in the code.
34+
35+
**OPTIONAL -** Explain unit tests added, if not clear in the code.
2736

2837
## Manual testing
38+
2939
**RECOMMEND - OPTIONAL -** Explain what scenarios were tested and the environment.
3040
Example: Tested opening a notification while the app was foregrounded, app build with Android Studio 2020.3 with a fresh install of the OneSignal example app on a Pixel 6 with Android 12.
3141

3242
# Affected code checklist
33-
- [ ] Notifications
34-
- [ ] Display
35-
- [ ] Open
36-
- [ ] Push Processing
37-
- [ ] Confirm Deliveries
38-
- [ ] Outcomes
39-
- [ ] Sessions
40-
- [ ] In-App Messaging
41-
- [ ] REST API requests
42-
- [ ] Public API changes
43+
44+
- [ ] Notifications
45+
- [ ] Display
46+
- [ ] Open
47+
- [ ] Push Processing
48+
- [ ] Confirm Deliveries
49+
- [ ] Outcomes
50+
- [ ] Sessions
51+
- [ ] In-App Messaging
52+
- [ ] REST API requests
53+
- [ ] Public API changes
4354

4455
# Checklist
56+
4557
## Overview
46-
- [ ] I have filled out all **REQUIRED** sections above
47-
- [ ] PR does one thing
48-
- If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
49-
- [ ] Any Public API changes are explained in the PR details and conform to existing APIs
58+
59+
- [ ] I have filled out all **REQUIRED** sections above
60+
- [ ] PR does one thing
61+
- If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
62+
- [ ] Any Public API changes are explained in the PR details and conform to existing APIs
5063

5164
## Testing
52-
- [ ] I have included test coverage for these changes, or explained why they are not needed
53-
- [ ] All automated tests pass, or I explained why that is not possible
54-
- [ ] I have personally tested this on my device, or explained why that is not possible
65+
66+
- [ ] I have included test coverage for these changes, or explained why they are not needed
67+
- [ ] All automated tests pass, or I explained why that is not possible
68+
- [ ] I have personally tested this on my device, or explained why that is not possible
5569

5670
## Final pass
57-
- [ ] Code is as readable as possible.
58-
- Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
59-
- [ ] I have reviewed this PR myself, ensuring it meets each checklist item
60-
- WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.
71+
72+
- [ ] Code is as readable as possible.
73+
- Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
74+
- [ ] I have reviewed this PR myself, ensuring it meets each checklist item
75+
- WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

.github/release-drafter.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ categories:
66
- title: 🐛 Bug Fixes
77
label: Bug
88
- title: 🧰 Improvements
9-
label: Improvement
9+
label: Improvement
1010
- title: down arrow Dependency Updates
11-
label: Dependencies
11+
label: Dependencies
1212
change-template: '- $TITLE (#$NUMBER)'
1313
version-resolver:
1414
major:
@@ -23,5 +23,5 @@ version-resolver:
2323
default: patch
2424
template: |
2525
## Other Changes
26-
26+
2727
$CHANGES

.github/workflows/Zapier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
# Triggers the workflow on push or pull request events but only for the "main" branch
88
issues:
99
types: [closed]
10-
10+
1111
permissions:
1212
issues: read
1313

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ name: Test
22

33
on:
44
pull_request:
5-
branches: "**"
5+
branches: '**'
66

77
jobs:
88
build:
99
runs-on: ubuntu-20.04
1010
steps:
1111
- uses: actions/checkout@v3
12-
- name: "[Setup] Node"
12+
- name: '[Setup] Node'
1313
uses: actions/setup-node@v3
1414
with:
1515
node-version: 16
16-
- name: "[Setup] Dependencies"
16+
- name: '[Setup] Dependencies'
1717
run: yarn
18-
- name: "[Test] Linting"
18+
- name: '[Test] Linting'
1919
run: yarn lint
2020

2121
- name: Unit tests results

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Release Drafter
32

43
on:

CONTRIBUTING.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,34 @@
33
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
44

55
### How to Contribute
6+
67
We love the open source community and enjoy the support and contributions of many of our users. We ask that any potential contributors to the SDK Follow the following guidelines:
78

89
If your proposed contribution is a small bug fix, please feel free to create your own fork of the repository and create a pull request.
910

1011
If your contribution would _break_ or _change_ the functionality of the SDK, please reach out to us on (contact) before you put in a lot of effort into a change we may not be able to use. We try our best to make sure that the SDK remains stable so that developers do not have to continually change their code, however some breaking changes _are_ desirable, so please get in touch to discuss your idea before you put in a lot of effort.
1112

1213
#### Reporting Bugs
13-
If you have found a bug with the SDK, please feel free to open an Issue.
14+
15+
If you have found a bug with the SDK, please feel free to open an Issue.
1416

1517
If you are pretty certain that the issue is only related to the native iOS SDK, please open the issue in our [native iOS SDK repository](https://github.com/OneSignal/OneSignal-iOS-SDK).
1618

1719
If you are certain the issue is contained to the Android SDK, please open the issue in our [Android SDK repository](https://github.com/OneSignal/OneSignal-Android-SDK)
1820

1921
#### Before Submitting A Bug Report
22+
2023
Before creating bug reports, please check this list of steps to follow.
2124

2225
1. Make sure that you are actually encountering an _issue_ and not a _question_. If you simply have a question about the SDK, we would be more than happy to assist you in our Support section on the web (https://www.onesignal.com - click the Message button at the bottom right)
2326
2. Please make sure to [include as many details as possible](#how-do-i-submit-a-good-bug-report)
2427

2528
> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
2629
27-
2830
#### How Do I Submit a Good Bug Report
29-
* **Use a clear and descriptive title** for the issue to identify the problem.
30-
* **Include Reproducibility** It is nearly always a good idea to include steps to reproduct the issue. If you cannot reliably reproduce the issue yourself, that's ok, but reproducible steps help best.
31-
* **Describe your environment**, tell us what version of react-native your app is using, what version of the react-native-onesignal SDK you're using, how you added it to your project, and so on.
32-
* **Include a Stack Trace** If your issue involves a crash/exception, ***PLEASE*** post the stack trace to help us identify the root issue.
33-
* **Include an Example Project** This isn't required, but if you want your issue fixed quickly, it's often a good idea to include an example project as a zip and include it with the issue. You can also download the Demo project (included in the `/examples` folder of this repo) and set up an example project with this code as a starting point.
31+
32+
- **Use a clear and descriptive title** for the issue to identify the problem.
33+
- **Include Reproducibility** It is nearly always a good idea to include steps to reproduct the issue. If you cannot reliably reproduce the issue yourself, that's ok, but reproducible steps help best.
34+
- **Describe your environment**, tell us what version of react-native your app is using, what version of the react-native-onesignal SDK you're using, how you added it to your project, and so on.
35+
- **Include a Stack Trace** If your issue involves a crash/exception, **_PLEASE_** post the stack trace to help us identify the root issue.
36+
- **Include an Example Project** This isn't required, but if you want your issue fixed quickly, it's often a good idea to include an example project as a zip and include it with the issue. You can also download the Demo project (included in the `/examples` folder of this repo) and set up an example project with this code as a starting point.

0 commit comments

Comments
 (0)