mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-28 10:41:12 +00:00
.github/scripts/label_promoted_commits.py: only match the Close tag in the last line in the commit message
When a backport PR is promoted to the release branch, we automatically close the backport PR (since GitHub will only close the one based on the default branch) and update the labels in the original PRs
In a situation when we have multiple `closes` prefixes, the script will use the first one (which is not the correct one), see 3ddb61c90e
Fixing this by always using the last line with the `closes` prefix
Closes scylladb/scylladb#21498
This commit is contained in:
committed by
Botond Dénes
parent
381faa2649
commit
cc71077e33
3
.github/scripts/label_promoted_commits.py
vendored
3
.github/scripts/label_promoted_commits.py
vendored
@@ -54,7 +54,8 @@ def main():
|
||||
# Print commit information
|
||||
for commit in commits:
|
||||
print(f'Commit sha is: {commit.sha}')
|
||||
match = pr_pattern.search(commit.commit.message)
|
||||
pr_last_line = commit.commit.message.splitlines()[-1]
|
||||
match = pr_pattern.search(pr_last_line)
|
||||
if match:
|
||||
pr_number = int(match.group(1))
|
||||
if pr_number in processed_prs:
|
||||
|
||||
Reference in New Issue
Block a user