Skip to content

Commit

Permalink
add script
Browse files Browse the repository at this point in the history
borkdude committed Nov 15, 2021
1 parent d696a5e commit 6940f50
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions script/changelog.clj
Original file line number Diff line number Diff line change
@@ -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/fs/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))

0 comments on commit 6940f50

Please sign in to comment.