feat: add Huawei and email_reply_to_address parameters to Notification#73
feat: add Huawei and email_reply_to_address parameters to Notification#73sherwinski merged 1 commit intomainfrom
Conversation
4019c00 to
d27eb61
Compare
d27eb61 to
8a5dfca
Compare
8a5dfca to
d9d4ca8
Compare
d9d4ca8 to
d122df9
Compare
| 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
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 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: readright 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.
| @@ -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 }} |
email_reply_to_address parameters to Notification
7bb3637 to
e01cee1
Compare
email_reply_to_address parameters to Notification## [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]
|
🎉 This PR is included in version 5.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## 1.0.0 (2026-03-27) ### Features * add Huawei and email_reply_to_address parameters to Notification ([OneSignal#73](https://github.com/URIKIRI/onesignal-java-api/issues/73)) ([62dc9fc](62dc9fc)) * add v2.1.0 package updates ([396600b](396600b)) * add v2.2.0 package updates ([b220ea8](b220ea8)) * add v2.2.0 package updates ([46ba07a](46ba07a)) * add v5.0.0-beta1 package updates ([c1fbcf6](c1fbcf6)) * add v5.1.0-beta1 package updates ([c819297](c819297)) * add v5.2.0-beta1 package updates ([c493f79](c493f79)) * add v5.2.0-beta1 package updates ([cce80aa](cce80aa)) * add v5.2.0-beta1 package updates ([bf1380d](bf1380d)) * add v5.2.0-beta1 package updates ([de99c8a](de99c8a)) * add v5.2.1-beta1 package updates ([c8fbe0a](c8fbe0a)) * add v5.3.0-beta1 package updates ([670ae2c](670ae2c)) * add v5.3.0-beta1 package updates ([697b2f8](697b2f8)) * add v5.3.0-beta1 package updates ([90f6f83](90f6f83)) * add v5.3.0-beta1 package updates ([a6d6c75](a6d6c75)) * add v5.3.0-beta1 package updates ([1dceaaf](1dceaaf)) * add v5.3.0-beta1 package updates ([a8d3d46](a8d3d46)) * add v5.3.0-beta1 package updates ([abdb323](abdb323)) [skip ci]
Features
Adds the following
Notificationparameters:huawei_badge_classhuawei_badge_add_numhuawei_badge_set_numhuawei_categoryhuawei_bi_tagemail_reply_to_address