Skip to content

Commit

Permalink
Merge pull request #1648 from OneSignal/user_model_rebase
Browse files Browse the repository at this point in the history
Merge major_release_5.0.0 into main
  • Loading branch information
jennantilla committed Mar 13, 2024
2 parents 6d052e9 + 30667a1 commit ced01ce
Show file tree
Hide file tree
Showing 65 changed files with 4,064 additions and 10,899 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/ask-question.yml
@@ -1,7 +1,7 @@
name: 🙋‍♂️ Ask a question
description: Tell us what's on your mind
title: "[question]: "
labels: ["question"]
title: '[question]: '
labels: ['question']
# assignees:
# - OneSignal/ios-sdk
body:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
@@ -1,7 +1,7 @@
name: 🪳 Bug report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage"]
title: '[Bug]: '
labels: ['bug', 'triage']
# assignees:
# - OneSignal/ios-sdk
body:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/general-feedback.yml
@@ -1,7 +1,7 @@
name: 📣 General feedback
description: Tell us what's on your mind
title: "[Feedback]: "
labels: ["triage"]
title: '[Feedback]: '
labels: ['triage']
# assignees:
# - OneSignal/ios-sdk
body:
Expand Down
67 changes: 41 additions & 26 deletions .github/pull_request_template.md
@@ -1,60 +1,75 @@
<!-- START -->

# READ AND DELETE THIS SECTION BEFORE SUBMITTING PR
* **Fill out each _REQUIRED_ section**
* **Fill out _OPTIONAL_ sections, remove section if it doesn't apply to your PR**
* **Read and fill out each of the checklists below**
* **Remove this section after reading**

- **Fill out each _REQUIRED_ section**
- **Fill out _OPTIONAL_ sections, remove section if it doesn't apply to your PR**
- **Read and fill out each of the checklists below**
- **Remove this section after reading**
<!-- END -->

# Description

## One Line Summary

**REQUIRED** - Very short description that summaries the changes in this PR.

## Details

### Motivation

**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.

### Scope

**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.

### OPTIONAL - Other

**OPTIONAL -** Feel free to add any other sections or sub-sections that can explain your PR better.

# Testing

## Unit testing
**OPTIONAL -** Explain unit tests added, if not clear in the code.

**OPTIONAL -** Explain unit tests added, if not clear in the code.

## Manual testing

**RECOMMEND - OPTIONAL -** Explain what scenarios were tested and the environment.
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.

# Affected code checklist
- [ ] Notifications
- [ ] Display
- [ ] Open
- [ ] Push Processing
- [ ] Confirm Deliveries
- [ ] Outcomes
- [ ] Sessions
- [ ] In-App Messaging
- [ ] REST API requests
- [ ] Public API changes

- [ ] Notifications
- [ ] Display
- [ ] Open
- [ ] Push Processing
- [ ] Confirm Deliveries
- [ ] Outcomes
- [ ] Sessions
- [ ] In-App Messaging
- [ ] REST API requests
- [ ] Public API changes

# Checklist

## Overview
- [ ] I have filled out all **REQUIRED** sections above
- [ ] PR does one thing
- 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
- [ ] Any Public API changes are explained in the PR details and conform to existing APIs

- [ ] I have filled out all **REQUIRED** sections above
- [ ] PR does one thing
- 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
- [ ] Any Public API changes are explained in the PR details and conform to existing APIs

## Testing
- [ ] I have included test coverage for these changes, or explained why they are not needed
- [ ] All automated tests pass, or I explained why that is not possible
- [ ] I have personally tested this on my device, or explained why that is not possible

- [ ] I have included test coverage for these changes, or explained why they are not needed
- [ ] All automated tests pass, or I explained why that is not possible
- [ ] I have personally tested this on my device, or explained why that is not possible

## Final pass
- [ ] Code is as readable as possible.
- Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
- [ ] I have reviewed this PR myself, ensuring it meets each checklist item
- 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.

- [ ] Code is as readable as possible.
- Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
- [ ] I have reviewed this PR myself, ensuring it meets each checklist item
- 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.
6 changes: 3 additions & 3 deletions .github/release-drafter.yml
Expand Up @@ -6,9 +6,9 @@ categories:
- title: 🐛 Bug Fixes
label: Bug
- title: 🧰 Improvements
label: Improvement
label: Improvement
- title: down arrow Dependency Updates
label: Dependencies
label: Dependencies
change-template: '- $TITLE (#$NUMBER)'
version-resolver:
major:
Expand All @@ -23,5 +23,5 @@ version-resolver:
default: patch
template: |
## Other Changes
$CHANGES
2 changes: 1 addition & 1 deletion .github/workflows/Zapier.yml
Expand Up @@ -7,7 +7,7 @@ on:
# Triggers the workflow on push or pull request events but only for the "main" branch
issues:
types: [closed]

permissions:
issues: read

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -2,20 +2,20 @@ name: Test

on:
pull_request:
branches: "**"
branches: '**'

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "[Setup] Node"
- name: '[Setup] Node'
uses: actions/setup-node@v3
with:
node-version: 16
- name: "[Setup] Dependencies"
- name: '[Setup] Dependencies'
run: yarn
- name: "[Test] Linting"
- name: '[Test] Linting'
run: yarn lint

- name: Unit tests results
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/codeql.yml
@@ -0,0 +1,82 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main", "major_release_5.0.0" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main", "major_release_5.0.0" ]
schedule:
- cron: '37 19 * * 4'

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript-typescript' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
18 changes: 18 additions & 0 deletions .github/workflows/npm_deploy.yml
@@ -0,0 +1,18 @@
name: NPM Publish

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Publish package
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM }}
1 change: 0 additions & 1 deletion .github/workflows/release-drafter.yml
@@ -1,4 +1,3 @@

name: Release Drafter

on:
Expand Down
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Expand Up @@ -3,31 +3,34 @@
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

### How to Contribute

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:

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.

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.

#### Reporting Bugs
If you have found a bug with the SDK, please feel free to open an Issue.

If you have found a bug with the SDK, please feel free to open an Issue.

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).

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)

#### Before Submitting A Bug Report

Before creating bug reports, please check this list of steps to follow.

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)
2. Please make sure to [include as many details as possible](#how-do-i-submit-a-good-bug-report)

> **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.

#### How Do I Submit a Good Bug Report
* **Use a clear and descriptive title** for the issue to identify the problem.
* **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.
* **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.
* **Include a Stack Trace** If your issue involves a crash/exception, ***PLEASE*** post the stack trace to help us identify the root issue.
* **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.

- **Use a clear and descriptive title** for the issue to identify the problem.
- **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.
- **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.
- **Include a Stack Trace** If your issue involves a crash/exception, **_PLEASE_** post the stack trace to help us identify the root issue.
- **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 comments on commit ced01ce

Please sign in to comment.