Skip to content

Commit

Permalink
Replace user links in releases with GitHub @mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvollebregt committed Apr 6, 2024
1 parent 77e7bd5 commit a79bc71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ jobs:
raise Exception(f"Changes were not detected in CHANGELOG.md for version {version}")
changes = re.search(changes_for_target_version_regex, changelog).group(1).strip()
# Replace GitHub user links with @mentions
github_user_regex = re.compile(r"\[[^\]]+\]\(https:\/\/github\.com\/([A-Za-z0-9-]+)\)")
changes = github_user_regex.sub(r'@\1', changes)
# Get the previous version
versions_regex = r"^## (\d+\.\d+\.\d+)(?=^## \d+\.\d+\.\d+|$)"
versions = re.findall(versions_regex, changelog, re.MULTILINE)
Expand Down

0 comments on commit a79bc71

Please sign in to comment.