changelog script
This commit is contained in:
parent
76313a7089
commit
4fb0da7daf
1 changed files with 17 additions and 0 deletions
17
script/changelog.clj
Executable file
17
script/changelog.clj
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bb
|
||||||
|
|
||||||
|
(ns changelog
|
||||||
|
(:require [clojure.string :as str]))
|
||||||
|
|
||||||
|
(let [changelog (slurp "CHANGELOG.md")
|
||||||
|
replaced (str/replace changelog
|
||||||
|
#" #(\d+)"
|
||||||
|
(fn [[_ issue after]]
|
||||||
|
(format " [#%s](https://github.com/babashka/pods/issues/%s)%s"
|
||||||
|
issue issue (str after))))
|
||||||
|
replaced (str/replace replaced
|
||||||
|
#"@([a-zA-Z0-9-_]+)([, \.)])"
|
||||||
|
(fn [[_ name after]]
|
||||||
|
(format "[@%s](https://github.com/%s)%s"
|
||||||
|
name name after)))]
|
||||||
|
(spit "CHANGELOG.md" replaced))
|
||||||
Loading…
Reference in a new issue