mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-02 02:37:15 +00:00
add changelog linkifier util
This commit is contained in:
parent
437e55c2c2
commit
8c86fd06db
1 changed files with 14 additions and 0 deletions
14
test/helper_tools/linkify-changelog.py
Normal file
14
test/helper_tools/linkify-changelog.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env python3
|
||||
from pathlib import Path
|
||||
import re
|
||||
|
||||
changelog = Path(__file__).parent / "../../CHANGELOG.md"
|
||||
|
||||
text = changelog.read_text(encoding="utf8")
|
||||
text, n = re.subn(
|
||||
r"\s*\(([^)]+)#(\d+)\)",
|
||||
"\n (\\1[#\\2](https://github.com/mitmproxy/mitmproxy/issues/\\2))",
|
||||
text
|
||||
)
|
||||
changelog.write_text(text, encoding="utf8")
|
||||
print(f"Linkified {n} issues and users.")
|
||||
Loading…
Add table
Add a link
Reference in a new issue