Skip to content

chore: fix formatting and repo name extraction in changelog script #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions scripts/linkify_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
# It assumes the changelog file is in the root of the repo.
repo_name = ""

# This script goes through the provided file, and replaces any " \#<number>",
# with the valid mark down formatted link to it. e.g.
# This script goes through the provided file and replaces any "\#<number>",
# with a valid markdown formatted link to it. e.g.
# " [\#number](https://github.com/arkworks-rs/template/pull/<number>)
# Note that if the number is for a an issue, github will auto-redirect you when you click the link.
# Note that if the number is for 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.md
Expand All @@ -24,7 +24,6 @@
line = re.sub(
r"\- #([0-9]*)",
r"- [\#\1](https://github.com/arkworks-rs/" + repo_name + r"/pull/\1)",
line.rstrip(),
)
# edits the current file
print(line)
line.rstrip() # Removing trailing spaces and newlines
)
print(line)