feat: add Huawei and email_reply_to_address parameters to Notification#37
feat: add Huawei and email_reply_to_address parameters to Notification#37sherwinski merged 1 commit intomainfrom
Conversation
49a2418 to
b5e8568
Compare
b5e8568 to
3f3132b
Compare
3f3132b to
464a507
Compare
464a507 to
9e89c0c
Compare
| 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
Show autofix suggestion
Hide autofix suggestion
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.
| @@ -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 | ||
|
|
email_reply_to_address parameters to Notification
email_reply_to_address parameters to Notification5c872a7 to
ea2cd74
Compare
## [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]
|
🎉 This PR is included in version 5.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Features
Adds the following
Notificationparameters:huawei_badge_classhuawei_badge_add_numhuawei_badge_set_numhuawei_categoryhuawei_bi_tagemail_reply_to_address