mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
Revert ".github/scripts/auto-backport.py: validate backport candidate with Fixes prefix"
This reverts commit 8414cd743e. It prevents
pulling pull requests that do have "Fixes" references.
This commit is contained in:
16
.github/scripts/auto-backport.py
vendored
16
.github/scripts/auto-backport.py
vendored
@@ -129,20 +129,6 @@ def backport(repo, pr, version, commits, backport_base_branch):
|
||||
logging.warning(f"GitCommandError: {e}")
|
||||
|
||||
|
||||
def with_github_keyword_prefix(repo, pr):
|
||||
pattern = rf"(?:fix(?:|es|ed))\s*:?\s*(?:(?:(?:{repo.full_name})?#)|https://github\.com/{repo.full_name}/issues/)(\d+)"
|
||||
match = re.findall(pattern, pr.body, re.IGNORECASE)
|
||||
if not match:
|
||||
print(f'No valid close reference for {pr.number}')
|
||||
comment = f':warning: @{pr.user.login} PR body does not contain a Fixes reference to an issue '
|
||||
comment += ' and can not be backported\n\n'
|
||||
comment += 'The following labels were removed:\n'
|
||||
create_pr_comment_and_remove_label(pr, comment)
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
base_branch = args.base_branch.split('/')[2]
|
||||
@@ -183,8 +169,6 @@ def main():
|
||||
if not backport_labels:
|
||||
print(f'no backport label: {pr.number}')
|
||||
continue
|
||||
if args.commits and not with_github_keyword_prefix(repo, pr):
|
||||
continue
|
||||
commits = get_pr_commits(repo, pr, stable_branch, start_commit)
|
||||
logging.info(f"Found PR #{pr.number} with commit {commits} and the following labels: {backport_labels}")
|
||||
for backport_label in backport_labels:
|
||||
|
||||
Reference in New Issue
Block a user