babashka/script/changelog.clj
2020-05-30 22:12:29 +02:00

12 lines
433 B
Clojure
Executable file

#!/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))