Skip to content

Commit

Permalink
scripts: make linkifier default to 'pull' rather than 'issue' (#5689)
Browse files Browse the repository at this point in the history
  • Loading branch information
tessr committed Nov 19, 2020
1 parent 68dc751 commit f97a498
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/linkify_changelog.py
Expand Up @@ -3,11 +3,11 @@

# 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/issues/<number>)
# Note that if the number is for a PR, github will auto-redirect you when you click the link.
# " [\#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/issues/\1)", line.rstrip())
line = re.sub(r"\s\\#([0-9]*)", r" [\\#\1](https://github.com/tendermint/tendermint/pull/\1)", line.rstrip())
print(line)

0 comments on commit f97a498

Please sign in to comment.