Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions torchci/lib/bot/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export function isPyTorchPyTorch(owner: string, repo: string): boolean {
return isPyTorchOrg(owner) && repo === "pytorch";
}

export function isDrCIEnabled(owner: string, repo: string): boolean {
return isPyTorchOrg(owner) && ["pytorch", "vision"].includes(repo);
}

export class CachedConfigTracker {
repoConfigs: any = {};

Expand Down
6 changes: 3 additions & 3 deletions torchci/lib/drciUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import _ from "lodash";
import { Octokit } from "octokit";
import { IssueData } from "./types";
import fetchIssuesByLabel from "lib/fetchIssuesByLabel";
import { isPyTorchPyTorch } from "./bot/utils";
import { isPyTorchPyTorch, isDrCIEnabled } from "./bot/utils";

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