diff --git a/scripts/ci/check_pull_request.py b/scripts/ci/check_pull_request.py index 94e34e890c3..bfd9913570e 100644 --- a/scripts/ci/check_pull_request.py +++ b/scripts/ci/check_pull_request.py @@ -81,9 +81,17 @@ def main(): def check_pull_request(title, body): if title.startswith('['): error_flag = regex_line(title) + is_edit_history_note = False + history_note_error_flag = False for line in body: if line.startswith('['): - error_flag = regex_line(line) or error_flag + # get component name in [] + ref = re.findall(r'[\[](.*?)[\]]', line) + if ref and ref[0] not in ['Component Name 1', 'Component Name 2']: + is_edit_history_note = True + history_note_error_flag = regex_line(line) or history_note_error_flag + # If edit history notes, ignore title check result + error_flag = error_flag if not is_edit_history_note else history_note_error_flag elif title.startswith('{'): error_flag = False else: