(version)
| 250 | } |
| 251 | |
| 252 | function cleanupVersionBlock(version) { |
| 253 | // Sort the references first, numbers come before sub project refs. |
| 254 | version.entries.forEach(entry => entry.refs.sort((a, b) => referenceSort(a, b))); |
| 255 | |
| 256 | // Sort the entries by change type. |
| 257 | version.entries.sort((a, b) => reorderGroups(a, b)); |
| 258 | |
| 259 | // Ensure entries end with a dot. |
| 260 | version.entries.forEach(entry => { |
| 261 | var desc = entry.description; |
| 262 | var originalBug = false; |
| 263 | if (desc.endsWith("(original bug)")) { |
| 264 | originalBug = true; |
| 265 | entry.description = desc.substring(0, desc.indexOf("(original bug")).trim(); |
| 266 | } |
| 267 | if (!entry.description.endsWith(".")) { |
| 268 | entry.description += "."; |
| 269 | } |
| 270 | if (originalBug) { |
| 271 | entry.description += " (original bug)"; |
| 272 | } |
| 273 | }); |
| 274 | } |
| 275 | |
| 276 | function cleanupVersions(versions) { |
| 277 | for (const version of versions) { |
no test coverage detected