https://github.com/tendermint/tendermint
Raw File
Tip revision: d3a421b136d0b8f6069c5e11d1850011f219c867 authored by tycho garen on 17 September 2021, 19:27:21 UTC
rename NewABCIClient to NewClient
Tip revision: d3a421b
linkify_changelog.py
import fileinput
import re

# This script goes through the provided file, and replaces any " \#<number>",
# with the valid mark down formatted link to it. e.g.
# " [\#number](https://github.com/tendermint/tendermint/pull/<number>)
# Note that if the number is for a an issue, github will auto-redirect you when you click the link.
# It is safe to run the script multiple times in succession. 
#
# Example usage $ python3 linkify_changelog.py ../CHANGELOG_PENDING.md
for line in fileinput.input(inplace=1):
    line = re.sub(r"\s\\#([0-9]*)", r" [\\#\1](https://github.com/tendermint/tendermint/pull/\1)", line.rstrip())
    print(line)
back to top