From dd90fd37354b5e75a8e06d0a3367eeea56f9a942 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Sun, 16 May 2021 17:57:42 +0500 Subject: [PATCH] Changelog fixes (#1849) --- CHANGELOG.md | 37 +++++++++++++--------------------- README.md | 2 +- packages/changelog/src/main.rs | 19 ++++++++++------- 3 files changed, 27 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d6a91d36e2..e3aeead8766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,32 +6,23 @@ - #### 🛠 Fixes - - Fix missing redirects (#1640). [[@siku2] [#1640]](https://github.com/yewstack/yew/pull/1640) + - Fix missing redirects. [[@siku2](https://github.com/siku2), [#1640](https://github.com/yewstack/yew/pull/1640)] + - Remove Drop bound from Task trait. [[@siku2](https://github.com/siku2), [#1627](https://github.com/yewstack/yew/pull/1627)] + - Enable std feature for indexmap. [[@jstarry](https://github.com/jstarry), [#1709](https://github.com/yewstack/yew/pull/1709)] - #### ⚡️ Features - - Implicit optional attributes (#1637). [[@siku2], [#1637](https://github.com/yewstack/yew/pull/1637)] - - Added callback_future_once in yewtil (#1696) (#1712). [[@fraillt], [#1696](https://github.com/yewstack/yew/pull/1696)] - - Added relevant examples section to the docs (#1695). [[@oOBoomberOo], [#1695](https://github.com/yewstack/yew/pull/1695)] - - Enable std feature for indexmap (#1709). [[@jstarry], [#1709](https://github.com/yewstack/yew/pull/1709)] - - Added missing KeyboardService re-export (#1694). [[@SOF3], [#1694](https://github.com/yewstack/yew/pull/1694)] - - Clean up component lifecycle state (#1700). [[@jstarry], [#1700](https://github.com/yewstack/yew/pull/1700)] - - Move top-level crates to packages/ (#1680). [[@philip-peterson], [#1680](https://github.com/yewstack/yew/pull/1680)] - - Refactor component lifecycle event handling (#1692). [[@jstarry], [#1692](https://github.com/yewstack/yew/pull/1692)] - - Prune stdweb examples to reduce maintenance burden (#1690). [[@jstarry], [#1690](https://github.com/yewstack/yew/pull/1690)] - - Refactor html module into new component submodule (#1689). [[@jstarry], [#1689](https://github.com/yewstack/yew/pull/1689)] - - Rename internal Agent structs to match Component (#1688). [[@jstarry], [#1688](https://github.com/yewstack/yew/pull/1688)] - - Revert "Update rand requirement from 0.7 to 0.8 (#1682)" (#1684). [[@siku2], [#1682](https://github.com/yewstack/yew/pull/1682)] - - Add discussion link to issue selector (#1674). [[@jstarry], [#1674](https://github.com/yewstack/yew/pull/1674)] - - Update link to Material Design Components (#1662). [[@TapioT], [#1662](https://github.com/yewstack/yew/pull/1662)] - - Extract Classes to a separate macro (#1601). [[@cecton], [#1601](https://github.com/yewstack/yew/pull/1601)] - - Improve the "keyed_list" example (#1650). [[@titaneric], [#1650](https://github.com/yewstack/yew/pull/1650)] - - Apply new Clippy lints, examples deployment, and stdweb integration tests (#1651). [[@siku2], [#1651](https://github.com/yewstack/yew/pull/1651)] - - Add documentation for component children (#1616). [[@K4rakara], [#1616](https://github.com/yewstack/yew/pull/1616)] - - More ergonomic use state 1505 (#1630). [[@mattferrin], [#1630](https://github.com/yewstack/yew/pull/1630)] - - Remove Drop bound from Task trait (#1627). [[@siku2], [#1627](https://github.com/yewstack/yew/pull/1627)] - - Document dynamic tag names (#1628). [[@siku2], [#1628](https://github.com/yewstack/yew/pull/1628)] - - Add a macro for building properties outside of html! (#1599). [[@siku2], [#1599](https://github.com/yewstack/yew/pull/1599)] + - Implicit optional attributes. [[@siku2](https://github.com/siku2), [#1637](https://github.com/yewstack/yew/pull/1637)] + - Added callback_future_once in yewtil.(#1712). [[@fraillt](https://github.com/fraillt), [#1696](https://github.com/yewstack/yew/pull/1696)] + - Added relevant examples section to the docs. [[@oOBoomberOo](https://github.com/oOBoomberOo), [#1695](https://github.com/yewstack/yew/pull/1695)] + - Added missing KeyboardService re-export. [[@SOF3](https://github.com/SOF3), [#1694](https://github.com/yewstack/yew/pull/1694)] + - Rename internal Agent structs to match Component. [[@jstarry](https://github.com/jstarry), [#1688](https://github.com/yewstack/yew/pull/1688)] + - Add discussion link to issue selector. [[@jstarry](https://github.com/jstarry), [#1674](https://github.com/yewstack/yew/pull/1674)] + - Update link to Material Design Components. [[@TapioT](https://github.com/TapioT), [#1662](https://github.com/yewstack/yew/pull/1662)] + - Extract Classes to a separate macro. [[@cecton](https://github.com/cecton), [#1601](https://github.com/yewstack/yew/pull/1601)] + - Improve the "keyed_list" example. [[@titaneric](https://github.com/titaneric), [#1650](https://github.com/yewstack/yew/pull/1650)] + - Add documentation for component children. [[@K4rakara](https://github.com/K4rakara), [#1616](https://github.com/yewstack/yew/pull/1616)] + - Add a macro for building properties outside of html!. [[@siku2](https://github.com/siku2), [#1599](https://github.com/yewstack/yew/pull/1599)] ## ✨ **0.17.4** *(2020-10-18)* diff --git a/README.md b/README.md index 535962d44a9..41f862759f5 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ | Documentation (latest) | - Examples + Examples | Changelog | diff --git a/packages/changelog/src/main.rs b/packages/changelog/src/main.rs index 04cd2074103..52a33145dd6 100644 --- a/packages/changelog/src/main.rs +++ b/packages/changelog/src/main.rs @@ -25,7 +25,7 @@ pub struct Cli { #[structopt(skip)] github_users: GitHubUsers, - #[structopt(skip = regex::Regex::new(r"\(#(\d+)\)").unwrap())] + #[structopt(skip = regex::Regex::new(r"\s*\(#(\d+)\)").unwrap())] re_issue: regex::Regex, } @@ -81,9 +81,14 @@ impl Cli { continue; } - let issue = - if let Some(issue) = self.re_issue.captures(first_line).map(|x| x[1].to_string()) { - issue + let (issue, first_line) = + if let Some(caps) = self.re_issue.captures_iter(first_line).last() { + let first_line_stripped = vec![ + &first_line[..caps.get(0).unwrap().start()], + &first_line[caps.get(0).unwrap().end()..], + ] + .join(""); + (caps[1].to_string(), first_line_stripped) } else { eprintln!("Missing issue for commit: {}", oid); continue; @@ -94,7 +99,7 @@ impl Cli { .find_user_by_commit_author(email, oid.to_string()) .with_context(|| format!("Could not find GitHub user for commit: {}", oid))?; - logs.push((first_line.to_owned(), user.to_owned(), issue.to_owned())); + logs.push((first_line.to_string(), user.to_owned(), issue.to_owned())); } let (features, fixes): (Vec<_>, Vec<_>) = logs @@ -115,7 +120,7 @@ impl Cli { for (msg, user, issue) in fixes { writeln!( f, - " - {msg}. [[@{user}], [#{issue}](https://github.com/yewstack/yew/pull/{issue})]", + " - {msg}. [[@{user}](https://github.com/{user}), [#{issue}](https://github.com/yewstack/yew/pull/{issue})]", msg = msg, user = user, issue = issue @@ -127,7 +132,7 @@ impl Cli { for (msg, user, issue) in features { writeln!( f, - " - {msg}. [[@{user}], [#{issue}](https://github.com/yewstack/yew/pull/{issue})]", + " - {msg}. [[@{user}](https://github.com/{user}), [#{issue}](https://github.com/yewstack/yew/pull/{issue})]", msg = msg, user = user, issue = issue