2022-02-04 15:00:44 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import re
|
2022-11-29 13:28:41 +00:00
|
|
|
from pathlib import Path
|
2022-02-04 15:00:44 +00:00
|
|
|
|
|
|
|
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))",
|
2022-04-26 11:53:35 +00:00
|
|
|
text,
|
2022-02-04 15:00:44 +00:00
|
|
|
)
|
|
|
|
changelog.write_text(text, encoding="utf8")
|
|
|
|
print(f"Linkified {n} issues and users.")
|