Skip to content

Commit 6bdb672

Browse files
Enabled DR. CI for vision repo (#3842)
Enabled DR. CI for vision repo. --------- Co-authored-by: Zain Rizvi <[email protected]>
1 parent dc15dec commit 6bdb672

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

torchci/lib/bot/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export function isPyTorchPyTorch(owner: string, repo: string): boolean {
1616
return isPyTorchOrg(owner) && repo === "pytorch";
1717
}
1818

19+
export function isDrCIEnabled(owner: string, repo: string): boolean {
20+
return isPyTorchOrg(owner) && ["pytorch", "vision"].includes(repo);
21+
}
22+
1923
export class CachedConfigTracker {
2024
repoConfigs: any = {};
2125

torchci/lib/drciUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import _ from "lodash";
22
import { Octokit } from "octokit";
33
import { IssueData } from "./types";
44
import fetchIssuesByLabel from "lib/fetchIssuesByLabel";
5-
import { isPyTorchPyTorch } from "./bot/utils";
5+
import { isDrCIEnabled } from "./bot/utils";
66

77
export const NUM_MINUTES = 30;
88
export const REPO: string = "pytorch";
@@ -116,8 +116,8 @@ ${sev_list}\n
116116
// The context here is the context from probot.
117117
// Today we only use probot for upserts, but this could later be split into logger
118118
export async function upsertDrCiComment(owner: string, repo: string, prNum: number, context: any, prUrl: string) {
119-
// Dr.CI only supports pytorch/pytorch at the moment
120-
if (!isPyTorchPyTorch(owner,repo)) {
119+
// Dr.CI only supports [pytorch/pytorch, pytorch/vision] at the moment
120+
if (!isDrCIEnabled(owner, repo)) {
121121
context.log(`Pull request to ${owner}/${repo} is not supported by Dr.CI bot, no comment is made`);
122122
return;
123123
}

0 commit comments

Comments
 (0)