From 804a954bd7399c37704f0fd647c47511e9a8be88 Mon Sep 17 00:00:00 2001 From: Claas Augner <495429+caugner@users.noreply.github.com> Date: Thu, 20 Apr 2023 16:04:52 +0200 Subject: [PATCH 1/2] ci: add release-please workflow (#186) See: https://github.com/google-github-actions/release-please-action#setting-up-this-action Also syncs the Cargo version with the latest tag and makes sure that Dependabot is using conventional commits so that they appear in the CHANGELOG. --- .github/dependabot.yml | 3 +++ .github/workflows/release-please.yml | 20 ++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 4 ++-- 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release-please.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 219c13ac..93f30f49 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,6 @@ updates: directory: "/" schedule: interval: "daily" + commit-message: + prefix: "build(deps): " + prefix-development: "build(dev-deps): " diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..01408be1 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,20 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + if: github.repository == 'mdn/rumba' + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v3 + with: + release-type: rust + package-name: release-please-action diff --git a/Cargo.lock b/Cargo.lock index 1f1e3ff5..cee2f8b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2664,7 +2664,7 @@ dependencies = [ [[package]] name = "rumba" -version = "0.0.1" +version = "1.0.0" dependencies = [ "actix-http", "actix-identity", diff --git a/Cargo.toml b/Cargo.toml index 2204342e..50d0565c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rumba" -version = "0.0.1" +version = "1.0.0" edition = "2021" [lib] @@ -72,4 +72,4 @@ basket = "0.0.5" [dev-dependencies] stubr = "0.5" stubr-attributes = "0.5" -assert-json-diff = "2" \ No newline at end of file +assert-json-diff = "2" From 4860b43556104a584df8775ab53821301c2a4087 Mon Sep 17 00:00:00 2001 From: Florian Dieminger Date: Thu, 20 Apr 2023 17:00:28 +0200 Subject: [PATCH 2/2] fix(clippy): fix derivable_impls (#188) See https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls --- src/api/search.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/api/search.rs b/src/api/search.rs index 56a81ae6..e055876d 100644 --- a/src/api/search.rs +++ b/src/api/search.rs @@ -45,20 +45,15 @@ struct Document { highlight: elastic::ResponseHighlight, } -#[derive(Deserialize)] +#[derive(Deserialize, Default)] #[serde(rename_all = "lowercase")] enum Sort { + #[default] Best, Relevance, Popularity, } -impl Default for Sort { - fn default() -> Self { - Sort::Best - } -} - #[derive(Deserialize)] struct Params { q: String,