mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert "Reenable disabled tests by pr body (#103790)"
This reverts commit 2237b4ad754cac060c906377800d28f7e56da8ec. Reverted https://github.com/pytorch/pytorch/pull/103790 on behalf of https://github.com/huydhn due to I think we tested it on PR but missed the logic in trunk where there is no PR number ([comment](https://github.com/pytorch/pytorch/pull/103790#issuecomment-1601890299))
This commit is contained in:
@ -4,13 +4,21 @@ import datetime
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
from typing import Any, Callable, cast, Dict, List, Optional
|
||||
from urllib.request import urlopen
|
||||
|
||||
|
||||
def get_disabled_issues() -> List[str]:
|
||||
reenabled_issues = os.getenv("REENABLED_ISSUES", "")
|
||||
issue_numbers = reenabled_issues.split(",")
|
||||
pr_body = os.getenv("PR_BODY", "")
|
||||
commit_messages = os.getenv("COMMIT_MESSAGES", "")
|
||||
# The below regex is meant to match all *case-insensitive* keywords that
|
||||
# GitHub has delineated would link PRs to issues, more details here:
|
||||
# https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue.
|
||||
# E.g., "Close #62851", "fixES #62851" and "RESOLVED #62851" would all match, but not
|
||||
# "closes #62851" --> extra space, "fixing #62851" --> not a keyword, nor "fix 62851" --> no #
|
||||
regex = "(?i)(Close(d|s)?|Resolve(d|s)?|Fix(ed|es)?) (#|https://github.com/pytorch/pytorch/issues/)([0-9]+)"
|
||||
issue_numbers = [x[5] for x in re.findall(regex, pr_body + commit_messages)]
|
||||
print("Ignoring disabled issues: ", issue_numbers)
|
||||
return issue_numbers
|
||||
|
||||
|
Reference in New Issue
Block a user