Skip to content

Commit

Permalink
Merge branch 'master' into add_credits
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrodinger71 authored Jun 27, 2024
2 parents 800dd54 + 2c1b8bf commit 8d6b16a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Tools/ATD/auto_cl.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,21 @@ def fetch_pr_data(token, repo, pr_number):
def fetch_single_pr(number):
try:
pr_info = get_pr_info(token, repo, number)
logging.info(pr_info)

# Проверяем, что PR был замержен
if not pr_info.get('merged_at'):
return None

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

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

changes = []
for line in body.splitlines():
Expand Down

0 comments on commit 8d6b16a

Please sign in to comment.