Skip to content

Commit

Permalink
Update auto_cl.py
Browse files Browse the repository at this point in the history
  • Loading branch information
themanyfaceddemon authored Jun 27, 2024
1 parent 9bbb775 commit fe2193d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tools/ATD/auto_cl.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ def fetch_single_pr(number):
return None

body = pr_info.get('body', '')
cl_match = re.search(r':cl:\s*(.*)', body)
cl_match = re.search(r':cl:\s*(.*?)(?:\r?\n|$)', body)
if not cl_match:
return None

# Извлекаем автора до конца строки
author = cl_match.group(1).split('\n')[0].strip() or pr_info['user']['login']
author = cl_match.group(1).strip() or pr_info['user']['login']

changes = []
for line in body.splitlines():
Expand Down Expand Up @@ -139,6 +139,9 @@ def fetch_single_pr(number):
return pr_data

def update_cl_file(file_path, new_data):
if os.path.exists(file_path):
os.remove(file_path)

old_entries = load_yaml(OLD_CHANGELOG_PATH).get("Entries", [])

# Calculate the next ID based on existing entries
Expand Down

0 comments on commit fe2193d

Please sign in to comment.