mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[ez] Make merge blocking sevs be based on label instead of string (#140636)
sev issues are now merge blocking if they are labeled merge blocking, instead of simply having the merge blocking string in the body. This makes it easier to default to non merge blocking when creating a sev Pull Request resolved: https://github.com/pytorch/pytorch/pull/140636 Approved by: https://github.com/huydhn, https://github.com/ZainRizvi
This commit is contained in:
committed by
PyTorch MergeBot
parent
83b6d91d08
commit
ea7d1826a2
3
.github/ISSUE_TEMPLATE/ci-sev.md
vendored
3
.github/ISSUE_TEMPLATE/ci-sev.md
vendored
@ -5,8 +5,7 @@ about: Tracking incidents for PyTorch's CI infra.
|
||||
|
||||
> NOTE: Remember to label this issue with "`ci: sev`"
|
||||
|
||||
<!-- uncomment the below line if you don't want this SEV to block merges -->
|
||||
<!-- **MERGE BLOCKING** -->
|
||||
<!-- Add the `merge blocking` label to this PR to prevent PRs from being merged while this issue is open -->
|
||||
|
||||
## Current Status
|
||||
*Status could be: preemptive, ongoing, mitigated, closed. Also tell people if they need to take action to fix it (i.e. rebase)*.
|
||||
|
17
.github/scripts/trymerge.py
vendored
17
.github/scripts/trymerge.py
vendored
@ -2005,17 +2005,18 @@ def check_for_sev(org: str, project: str, skip_mandatory_checks: bool) -> None:
|
||||
Dict[str, Any],
|
||||
gh_fetch_json_list(
|
||||
"https://api.github.com/search/issues",
|
||||
params={"q": f'repo:{org}/{project} is:open is:issue label:"ci: sev"'},
|
||||
# Having two label: queries is an AND operation
|
||||
params={
|
||||
"q": f'repo:{org}/{project} is:open is:issue label:"ci: sev" label:"merge blocking"'
|
||||
},
|
||||
),
|
||||
)
|
||||
if response["total_count"] != 0:
|
||||
for item in response["items"]:
|
||||
if "MERGE BLOCKING" in item["body"]:
|
||||
raise RuntimeError(
|
||||
"Not merging any PRs at the moment because there is a "
|
||||
+ "merge blocking https://github.com/pytorch/pytorch/labels/ci:%20sev issue open at: \n"
|
||||
+ f"{item['html_url']}"
|
||||
)
|
||||
raise RuntimeError(
|
||||
"Not merging any PRs at the moment because there is a "
|
||||
+ "merge blocking https://github.com/pytorch/pytorch/labels/ci:%20sev issue open at: \n"
|
||||
+ f"{response['items'][0]['html_url']}"
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user