-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
""" Fix the format of GitHub-generated release notes. """ | ||
|
||
import os.path | ||
import re | ||
|
||
if __name__ == "__main__": | ||
root_dir = os.path.normpath(os.path.join(os.path.dirname(__file__), "..")) | ||
|
||
import re | ||
with open(os.path.join(root_dir, 'CHANGELOG.rst'), 'r') as f: | ||
content = f.read().split('/n') | ||
|
||
root_dir = os.path.normpath(os.path.join(os.path.dirname(__file__), "..")) | ||
|
||
with open(os.path.join(root_dir, 'CHANGELOG.rst'), 'r') as f: | ||
content = f.read().split('/n') | ||
|
||
|
||
with open(os.path.join(root_dir,'CHANGELOG_new.rst'), 'w') as f: | ||
for line in content: | ||
new_line = re.sub(r'by @.+ in https://github\.com/silx-kit/silx/pull/(\d+)', r'(PR #\1)', line) | ||
f.write(new_line) | ||
f.write('\n') | ||
with open(os.path.join(root_dir,'CHANGELOG_new.rst'), 'w') as f: | ||
for line in content: | ||
new_line = re.sub(r'by @.+ in https://github\.com/silx-kit/silx/pull/(\d+)', r'(PR #\1)', line) | ||
f.write(new_line) | ||
f.write('\n') |