From fa67dfeee3dc7817cd1e9f8bc91a6b7814598f0b Mon Sep 17 00:00:00 2001 From: kjuulh Date: Fri, 4 Aug 2023 12:41:31 +0000 Subject: [PATCH] fix(crate): always prefix with 'v' when creating prs, or releases (#9) We don't want rust versions to include the 'v', however, many languages and tools require it. As such we're choosing when to do it, in this case at the api layer. Signed-off-by: kjuulh Reviewed-on: https://git.front.kjuulh.io/kjuulh/cuddle-please/pulls/9 Co-authored-by: kjuulh Co-committed-by: kjuulh --- README.md | 3 +++ crates/cuddle-please-misc/src/gitea_client.rs | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a241b7a..511aadb 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,12 @@ See docs for more information about installation and some such ### 0.3 Milestone +- [ ] Fix: 0.0.0 -> **v**0.0.0 +- [ ] Add release strategies - [ ] Add reporter for PR and Repositories - [ ] Add inquire for missing values when needed (when not running in ci or have a proper tty) - [ ] Break down cuddle-please-misc +- [ ] ci(release): Add cuddle-please release artifacts for the different os and so on. ### 0.x Milestone - [ ] Add github support diff --git a/crates/cuddle-please-misc/src/gitea_client.rs b/crates/cuddle-please-misc/src/gitea_client.rs index 4747198..b303cd5 100644 --- a/crates/cuddle-please-misc/src/gitea_client.rs +++ b/crates/cuddle-please-misc/src/gitea_client.rs @@ -330,7 +330,7 @@ impl RemoteGitEngine for GiteaClient { base: base.into(), body: body.into(), head: "cuddle-please/release".into(), - title: format!("chore(release): {}", version), + title: format!("chore(release): v{}", version), }; tracing::trace!( @@ -377,7 +377,7 @@ impl RemoteGitEngine for GiteaClient { let request = CreatePullRequestOption { body: body.into(), - title: format!("chore(release): {}", version), + title: format!("chore(release): v{}", version), }; tracing::trace!( @@ -429,9 +429,9 @@ impl RemoteGitEngine for GiteaClient { let request = CreateReleaseOption { body: body.into(), draft: false, - name: version.into(), + name: format!("v{version}"), prerelease, - tag_name: version.into(), + tag_name: format!("v{version}"), }; tracing::trace!(