From 778225cfc745c5cc76e9c2aa787c73b400b8f46c Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 18 Jul 2024 11:38:54 +0200 Subject: [PATCH 1/3] Try autofix for text formatting --- .github/workflows/autofix.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/autofix.yml diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 0000000000..11cf7a4130 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,31 @@ +name: autofix.ci # needed to securely identify the workflow + +on: + pull_request: + +permissions: + contents: read + +jobs: + autofix-text: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "oldstable" + + - name: Install shfmt + run: go install mvdan.cc/sh/v3/cmd/shfmt@latest + - name: Install npx (for prettier) + run: sudo apt install nodejs + + - name: Format Markdown + run: ./devtools/format_md.sh + - name: Format YAML + run: ./devtools/format_yml.sh + - name: Format Shell + run: ./devtools/format_sh.sh + + # Get latest version from https://autofix.ci/setup + - uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a From fc36f2f3e67dc5218f2a730e2e4d6ae8a697b19d Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 18 Jul 2024 11:53:08 +0200 Subject: [PATCH 2/3] Mess up some formatting --- .mergify.yml | 2 +- CHANGELOG.md | 5 ++--- devtools/check_contracts_full.sh | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 4895cfe743..d3222625b0 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,6 +1,6 @@ # See https://doc.mergify.io/configuration.html -pull_request_rules: +pull_request_rules : - name: automerge to main with label automerge conditions: - "#approved-reviews-by>=1" diff --git a/CHANGELOG.md b/CHANGELOG.md index 23f1352c91..3ecd39e5da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,10 +19,9 @@ and this project adheres to ### Fixed -- cosmwasm-std: Fix CWA-2024-002 +- cosmwasm-std: Fix CWA-2024-002 - cosmwasm-std: Fix `Reply` deserialization on CosmWasm 1.x chains ([#2159]) -- cosmwasm-std: Updated `QueryRequest` enum to use the default generic parameter - `Empty`. ([#2165]) +- cosmwasm-std: Updated `QueryRequest` enum to use the default generic parameter `Empty`. ([#2165]) [#2159]: https://github.com/CosmWasm/cosmwasm/pull/2159 [#2165]: https://github.com/CosmWasm/cosmwasm/pull/2165 diff --git a/devtools/check_contracts_full.sh b/devtools/check_contracts_full.sh index 35947c1029..9bf4c55a15 100755 --- a/devtools/check_contracts_full.sh +++ b/devtools/check_contracts_full.sh @@ -3,9 +3,9 @@ set -o errexit -o nounset -o pipefail command -v shellcheck >/dev/null && shellcheck "$0" GLOBIGNORE="contracts/floaty/" -for contract_dir in contracts/*/; do +for contract_dir in contracts/*/; do ( - cd "$contract_dir" + cd "$contract_dir" cargo fmt mkdir -p target/wasm32-unknown-unknown/release/ touch target/wasm32-unknown-unknown/release/"$(basename "$contract_dir" | tr - _)".wasm From 0433b82ca49d2fe7192f73dced9698d6e29b5693 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 13:14:45 +0000 Subject: [PATCH 3/3] [autofix.ci] apply automated fixes --- .mergify.yml | 2 +- CHANGELOG.md | 5 +++-- devtools/check_contracts_full.sh | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index d3222625b0..4895cfe743 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,6 +1,6 @@ # See https://doc.mergify.io/configuration.html -pull_request_rules : +pull_request_rules: - name: automerge to main with label automerge conditions: - "#approved-reviews-by>=1" diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ecd39e5da..23f1352c91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,9 +19,10 @@ and this project adheres to ### Fixed -- cosmwasm-std: Fix CWA-2024-002 +- cosmwasm-std: Fix CWA-2024-002 - cosmwasm-std: Fix `Reply` deserialization on CosmWasm 1.x chains ([#2159]) -- cosmwasm-std: Updated `QueryRequest` enum to use the default generic parameter `Empty`. ([#2165]) +- cosmwasm-std: Updated `QueryRequest` enum to use the default generic parameter + `Empty`. ([#2165]) [#2159]: https://github.com/CosmWasm/cosmwasm/pull/2159 [#2165]: https://github.com/CosmWasm/cosmwasm/pull/2165 diff --git a/devtools/check_contracts_full.sh b/devtools/check_contracts_full.sh index 9bf4c55a15..35947c1029 100755 --- a/devtools/check_contracts_full.sh +++ b/devtools/check_contracts_full.sh @@ -3,9 +3,9 @@ set -o errexit -o nounset -o pipefail command -v shellcheck >/dev/null && shellcheck "$0" GLOBIGNORE="contracts/floaty/" -for contract_dir in contracts/*/; do +for contract_dir in contracts/*/; do ( - cd "$contract_dir" + cd "$contract_dir" cargo fmt mkdir -p target/wasm32-unknown-unknown/release/ touch target/wasm32-unknown-unknown/release/"$(basename "$contract_dir" | tr - _)".wasm