Skip to content

Commit 35dd1c3

Browse files
committed
Original version of the script to link issues from datalad 0.11.3-26-g8af6b67d
1 parent 47efa78 commit 35dd1c3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

utils/link_issues_CHANGELOG

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
in=CHANGELOG.md
4+
5+
# Replace them with Markdown references
6+
sed -i -e 's/(\(#[0-9]\+\))/([\1])/g' "$in"
7+
8+
# Populate references
9+
cat "$in" | sponge | sed -n -e 's/.*(\[#\([0-9]\+\)\]).*/\1/gp' | sort | uniq \
10+
| while read issue; do
11+
# remove old one if exists
12+
sed -i -e "/^\[#$issue\]:.*/d" "$in"
13+
echo "[#$issue]: https://github.com/datalad/datalad/issues/$issue" >> "$in";
14+
done

0 commit comments

Comments
 (0)