babashka/script/changelog.clj

13 lines
433 B
Clojure
Raw Normal View History

2020-05-30 20:12:29 +00:00
#!/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/borkdude/babashka/issues/%s)%s"
issue issue after)))]
(spit "CHANGELOG.md" replaced))