Skip to content

Commit 1f53a66

Browse files
authored
Enhance pytorch bot support for meta-pytorch org (#7049)
Makes the bot's merging and Dr. CI functions work equally well in both the pytorch and meta-pytorch orgs
1 parent d6f9d76 commit 1f53a66

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

torchci/lib/bot/pytorchBotHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
CachedConfigTracker,
1313
hasApprovedPullRuns,
1414
isFirstTimeContributor,
15-
isPyTorchOrg,
15+
isPyTorchManagedOrg,
1616
isPyTorchPyTorch,
1717
reactOnComment,
1818
} from "./utils";
@@ -274,7 +274,7 @@ The explanation needs to be clear on why this is needed. Here are some good exam
274274

275275
if (forceRequested) {
276276
rejection_reason = await this.reasonToRejectForceRequest(forceMessage);
277-
} else if (isPyTorchOrg(this.owner)) {
277+
} else if (isPyTorchManagedOrg(this.owner)) {
278278
// Ensure the PR has been signed off on
279279
let approval_status = await this.getApprovalStatus();
280280
if (approval_status == PR_CHANGES_REQUESTED) {

torchci/lib/bot/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ export function repoKey(context: Context): string {
1616
return `${repo.owner}/${repo.repo}`;
1717
}
1818

19-
export function isPyTorchOrg(owner: string): boolean {
20-
return owner === "pytorch";
19+
export function isPyTorchManagedOrg(owner: string): boolean {
20+
return owner === "pytorch" || owner === "meta-pytorch";
2121
}
2222

2323
export function isPyTorchPyTorch(owner: string, repo: string): boolean {
24-
return isPyTorchOrg(owner) && repo === "pytorch";
24+
return owner === "pytorch" && repo === "pytorch";
2525
}
2626

2727
export function isDrCIEnabled(owner: string, repo: string): boolean {
2828
return (
29-
isPyTorchOrg(owner) &&
29+
isPyTorchManagedOrg(owner) &&
3030
[
3131
"pytorch",
3232
"vision",

0 commit comments

Comments
 (0)