diff --git a/scripts/rgh.py b/scripts/rgh.py index ea9022370..16924949d 100755 --- a/scripts/rgh.py +++ b/scripts/rgh.py @@ -641,8 +641,8 @@ def reword_pr_commits(org, repo, pr_number, title, no_issue): f" -e '1s,^.*$,{commit_prefix}{title},'" else: sed = f"sed -r"+\ - f" -e '1s,^(gh-[0-9]+:? +|{org}/[^ ]+ +|[Ii]ssue *[0-9]+:? +)?,{commit_prefix},'"+\ - f" -e '1s,\s*\(?#[0-9]+\)?$,,'" + f" -e '1s,^(gh-[0-9]+:? *|#[0-9]+:? *|{org}/[^ ]+ *|[Ii]ssue *[0-9]+:? *)?,{commit_prefix},'"+\ + f" -e '1s,\s*\(?#[0-9]+\)?$,,'" run_cmd([ 'git', 'filter-branch', '-f', '--msg-filter', sed,