Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore for release notes table script: fix two matching issues for repo name and PR number #13793

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions scripts/release_notes_update_pr_author_info_add_dup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ def store_exst_rn(ext_path,main_path):
def get_pr_info_from_github(cp_pr_link,cp_pr_title):

target_repo_pr_link= cp_pr_link.rsplit('/', 1)[0]
target_pr_number = re.findall(r'\(#(\d+)\)$', cp_pr_title)
target_pr_number = re.findall(r'\(#(\d+)\)$', cp_pr_title) # Match the original PR number in the end of the cherry-pick PR

if len(target_pr_number) > 1:
print ("There is more than one match result of original PR number from the cherry-pick title: " + cp_pr_title )
if target_pr_number:
if len(target_pr_number) > 1:
print ("There is more than one match result of original PR number from the cherry-pick title: " + cp_pr_title )
else:
pass
else:
target_pr_number = re.findall(r'\(#(\d+)\)', cp_pr_title) # Match the original PR number in the cherry-pick PR

target_pr_link = target_repo_pr_link + '/' + target_pr_number[0]

Expand Down Expand Up @@ -113,7 +118,7 @@ def update_pr_author_and_release_notes(excel_path):
pass

## Add the dup release note info
issue_link = re.search('https://github.com/(pingcap|tikv)/\w+/issues/\d+', current_formated_rn)
issue_link = re.search('https://github.com/(pingcap|tikv)/[\w-]+/issues/\d+', current_formated_rn)
for note_pair in note_pairs:
if (issue_link.group() == note_pair[0]) and ((current_pr_author in note_pair[4]) or len(note_pair[4]) == 0): # Add the dup release notes only if the issues link is the same as the existing one and the current author is in the existing author list
print('A duplicated note is found in row ' + str(row_index) + " from " + note_pair[2] + note_pair[1])
Expand Down