Skip to content

feat: add Huawei and email_reply_to_address parameters to Notification#73

Merged
sherwinski merged 1 commit intomainfrom
user-api-updates
Mar 24, 2026
Merged

feat: add Huawei and email_reply_to_address parameters to Notification#73
sherwinski merged 1 commit intomainfrom
user-api-updates

Conversation

@onesignal-deploy
Copy link
Collaborator

@onesignal-deploy onesignal-deploy commented Jan 29, 2026

Features

Adds the following Notification parameters:

  • huawei_badge_class
  • huawei_badge_add_num
  • huawei_badge_set_num
  • huawei_category
  • huawei_bi_tag
  • email_reply_to_address

@onesignal-deploy onesignal-deploy force-pushed the user-api-updates branch 2 times, most recently from 4019c00 to d27eb61 Compare February 2, 2026 19:13
@sherwinski sherwinski changed the title Add v5.3.0-beta1 package updates Add v5.3.0 package updates Mar 24, 2026
Comment on lines +50 to +119
name: Publish to Maven Central
needs: release
if: needs.release.outputs.new_release_published == 'true'
runs-on: ubuntu-latest
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
GPG_FILE_NAME: onesignal_sdk_gpg_subkeys.gpg
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Set version from input
if: github.event.inputs.version != ''
run: |
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
sed -i "s/version = '[^']*'/version = '${{ github.event.inputs.version }}'/" build.gradle

- name: Build project
run: ./gradlew build

- name: Run tests
run: ./gradlew test

- name: Decode GPG file from secret
run: |
echo "${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}" | base64 -d > "$GPG_FILE_NAME"
echo "GPG_FILE_PATH=$(pwd)/$GPG_FILE_NAME" >> $GITHUB_ENV

- name: Verify GPG file
run: |
ls -lh "$GPG_FILE_PATH"
gpg --list-packets "$GPG_FILE_PATH" || echo "Invalid key file!"

- name: Publish to Maven Central
run: |
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache \
-PmavenCentralUsername="$MAVEN_CENTRAL_USERNAME" \
-PmavenCentralPassword="$MAVEN_CENTRAL_PASSWORD" \
-Psigning.keyId="$SIGNING_KEY_ID" \
-Psigning.password="$SIGNING_PASSWORD" \
-Psigning.secretKeyRingFile="$GPG_FILE_PATH"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: build-artifacts
path: build/libs/

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 3 days ago

In general, fix this by explicitly setting minimal permissions for jobs that use the default GITHUB_TOKEN, instead of relying on repo defaults. For jobs that only need to read the repository (or not use the token at all), set contents: read at the job or workflow level; only grant write scopes where strictly required.

For this workflow, the release job already has a permissions block. The publish job (lines 49–120) does not, so we should add an explicit permissions block under publish:. The steps in publish only require cloning the code and uploading artifacts; both can work with a read‑only contents permission. Therefore, the best fix is to add:

permissions:
  contents: read

right below the existing runs-on: ubuntu-latest line in the publish job. This preserves all existing behavior while ensuring the GITHUB_TOKEN used in this job is limited to read‑only access to repository contents. No additional imports, methods, or definitions are needed, since this is purely a YAML configuration change.

Suggested changeset 1
.github/workflows/release.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -51,6 +51,8 @@
     needs: release
     if: needs.release.outputs.new_release_published == 'true'
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     env:
       MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
       MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
EOF
@@ -51,6 +51,8 @@
needs: release
if: needs.release.outputs.new_release_published == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
Copilot is powered by AI and may make mistakes. Always verify output.
@sherwinski sherwinski changed the title Add v5.3.0 package updates feat: add Huawei and email_reply_to_address parameters to Notification Mar 24, 2026
@sherwinski sherwinski changed the title feat: add Huawei and email_reply_to_address parameters to Notification Add v5.3.0 package updates Mar 24, 2026
@sherwinski sherwinski changed the title Add v5.3.0 package updates feat: add Huawei and email_reply_to_address parameters to Notification Mar 24, 2026
@sherwinski sherwinski merged commit 62dc9fc into main Mar 24, 2026
3 checks passed
@sherwinski sherwinski deleted the user-api-updates branch March 24, 2026 18:41
github-actions bot pushed a commit that referenced this pull request Mar 24, 2026
## [5.3.0](v5.2.0...v5.3.0) (2026-03-24)

### Features

* add Huawei and email_reply_to_address parameters to Notification ([#73](#73)) ([62dc9fc](62dc9fc))
 [skip ci]
@github-actions
Copy link

🎉 This PR is included in version 5.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants