Skip to content

feat: add Huawei and email_reply_to_address parameters to Notification#37

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

feat: add Huawei and email_reply_to_address parameters to Notification#37
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 49a2418 to b5e8568 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 +44 to +93
name: Publish to crates.io
needs: release
if: needs.release.outputs.new_release_published == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}

- name: Cache target directory
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}

- name: Run tests
run: cargo test --all-features
continue-on-error: true

- name: Build release
run: cargo build --release

- name: Publish to crates.io
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

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

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, the fix is to explicitly declare the minimal required GITHUB_TOKEN permissions for every job (or at the workflow root). For this specific workflow, the release job already has tailored write permissions, while the publish job only needs to read repository contents, so it should get its own restrictive permissions block.

The best single change is to add a permissions section under the publish job, parallel to name, needs, if, and runs-on. Set it to contents: read, which allows checking out code and interacting with artifacts/caches but not modifying repository content, issues, or pull requests. No other functionality of the job changes because publishing to crates.io uses CARGO_REGISTRY_TOKEN, not GITHUB_TOKEN. This modification is confined to .github/workflows/release.yml in the publish job definition around line 44.

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
@@ -45,6 +45,8 @@
     needs: release
     if: needs.release.outputs.new_release_published == 'true'
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     steps:
       - uses: actions/checkout@v5
 
EOF
@@ -45,6 +45,8 @@
needs: release
if: needs.release.outputs.new_release_published == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5

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 b5b483f into main Mar 24, 2026
3 checks passed
@sherwinski sherwinski deleted the user-api-updates branch March 24, 2026 19:04
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 ([#37](#37)) ([b5b483f](b5b483f))
 [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