versionFromReleaseName function
The version name out of a release name this tool wrote, which is
<versionName> (<versionCode>).
Used to look a promoted release up in the changelog. Falls back to the whole name for anything shaped differently — a release created by hand in the console — which then simply fails to match a section, and says so, rather than guessing.
Implementation
String versionFromReleaseName(String name) =>
RegExp(r'^(.*?)\s*\(\d+\)$').firstMatch(name)?.group(1) ?? name;