From 2176b1f69c3774b42a79db3737ea2318d264310d Mon Sep 17 00:00:00 2001 From: Pavel Rybalko Date: Wed, 15 Mar 2023 18:01:04 +0200 Subject: [PATCH 1/5] fix #4: upgrade svg crate --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9ebb5df..6c36c2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ description = "rust port of identicon generator for polkadot from polkadot.js" license = "Apache-2.0" name = "plot_icon" -version = "0.2.0" +version = "0.3.0" authors = ["Alexander Slesarev ", "Vera Abramova "] edition = "2021" repository = "https://github.com/paritytech/polkadot-identicon-rust" @@ -15,7 +15,7 @@ hex = {version = "0.4.3", optional = true} image = {version = "0.24.0", default-features = false, features = ["ico"], optional = true} palette = {version = "0.6.0", default-features = false, features = ["std"]} png = {version = "0.17.3", optional = true} -svg = {version = "0.10.0", optional = true} +svg = {version = "0.13.0", optional = true} [features] default = ["pix", "vec"] From 773c12a8b1a4bda53d52d2b95d5a4829561b7d7b Mon Sep 17 00:00:00 2001 From: Pavel Rybalko Date: Wed, 15 Mar 2023 18:05:57 +0200 Subject: [PATCH 2/5] fix clippy --- .gitignore | 4 ++++ src/lib.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 671ef89..e8fa73d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,7 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk +# VSCode +.vscode/ +# Intellij +.idea/ diff --git a/src/lib.rs b/src/lib.rs index 7d3e429..648e60f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -251,7 +251,7 @@ pub fn generate_png_scaled_custom_with_colors( size_in_pixels as u32, filter_type, ); - make_png_from_data(&image_small.to_vec(), size_in_pixels as u16).map_err(IdenticonError::Png) + make_png_from_data(&image_small, size_in_pixels as u16).map_err(IdenticonError::Png) } /// Data for small-sized identicon `png`, from `&[u8]` input slice, From 0cb20c8ccc5fa942cad4e96a6d10127d42170703 Mon Sep 17 00:00:00 2001 From: Pavel Rybalko Date: Thu, 16 Mar 2023 15:40:51 +0200 Subject: [PATCH 3/5] poke Semantic Pull Request --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e8fa73d..7f7be13 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk -# VSCode +# IDEs .vscode/ -# Intellij .idea/ From ddb45f950b4b111c7a39b135b143a19c2bf74ad6 Mon Sep 17 00:00:00 2001 From: Pavel Rybalko Date: Fri, 17 Mar 2023 14:12:12 +0200 Subject: [PATCH 4/5] fix semantic CI job --- .github/semantic.yml | 15 -------------- .github/workflows/semantic.yml | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 15 deletions(-) delete mode 100644 .github/semantic.yml create mode 100644 .github/workflows/semantic.yml diff --git a/.github/semantic.yml b/.github/semantic.yml deleted file mode 100644 index 4b50b34..0000000 --- a/.github/semantic.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Always validate the PR title, and ignore the commits -titleOnly: true - -types: - - major - - feat - - fix - - chore - - docs - - style - - refactor - - test - - build - - ci - - revert diff --git a/.github/workflows/semantic.yml b/.github/workflows/semantic.yml new file mode 100644 index 0000000..808d830 --- /dev/null +++ b/.github/workflows/semantic.yml @@ -0,0 +1,36 @@ +name: Semantic Pull Request + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + # By default, these PR titles are allowed: + # https://github.com/commitizen/conventional-commit-types + name: Validate PR title + runs-on: ubuntu-latest + steps: + + # Documentation: https://github.com/amannn/action-semantic-pull-request + - uses: amannn/action-semantic-pull-request@b6bca70dcd3e56e896605356ce09b76f7e1e0d39 # v5.1.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + major + feat + fix + chore + docs + style + refactor + test + build + ci + revert + validateSingleCommit: true + wip: true From f29ba82ca295d675ef8febd79875c57177a8093b Mon Sep 17 00:00:00 2001 From: Pavel Rybalko Date: Fri, 17 Mar 2023 15:41:13 +0200 Subject: [PATCH 5/5] remove semantic CI job --- .github/workflows/semantic.yml | 36 ---------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 .github/workflows/semantic.yml diff --git a/.github/workflows/semantic.yml b/.github/workflows/semantic.yml deleted file mode 100644 index 808d830..0000000 --- a/.github/workflows/semantic.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Semantic Pull Request - -on: - pull_request_target: - types: - - opened - - edited - - synchronize - -jobs: - main: - # By default, these PR titles are allowed: - # https://github.com/commitizen/conventional-commit-types - name: Validate PR title - runs-on: ubuntu-latest - steps: - - # Documentation: https://github.com/amannn/action-semantic-pull-request - - uses: amannn/action-semantic-pull-request@b6bca70dcd3e56e896605356ce09b76f7e1e0d39 # v5.1.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - types: | - major - feat - fix - chore - docs - style - refactor - test - build - ci - revert - validateSingleCommit: true - wip: true