Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/get_staging_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ def filter_issue(issue):
re.search("^Testsuite Status [0-9a-f]{40}$", issue["title"]) is not None
) # re.search returns None if pattern not found
issue_labels = [label["name"] for label in issue["labels"]]
labels_check = "valid-baseline" in issue_labels
# guaranteed that all issues have at least one label. If there are any
# without labels, something went wrong. Allow to choose baseline that
# has resolved regressions
labels_check = sorted(issue_labels) in [["valid-baseline"],
["resolved-regressions", "valid-baseline"],
["new-regressions", "resolved-regressions", "valid-baseline"]]
if "pull_request" not in issue.keys() and labels_check and title_check:
return True
return False
Expand Down
5 changes: 4 additions & 1 deletion scripts/get_staging_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ def parse_arguments():
help="Github access token",
)


return parser.parse_args()


def filter_issue(issue):
title_check = issue["title"].split("-")[-1] == "1"
issue_labels = [label["name"] for label in issue["labels"]]
labels_check = "valid-baseline" in issue_labels
# Having no labels means no failures and is not a staging run
# Allow choosing issues that only have 'linter-failure'
labels_check = issue_labels == [] or issue_labels == ['linter-failure']
if "pull_request" not in issue.keys() and labels_check and title_check:
return True
return False
Expand Down