Skip to content

Commit

Permalink
Fixed prod issue
Browse files Browse the repository at this point in the history
  • Loading branch information
craigloewen-msft committed Apr 15, 2024
1 parent 63d4550 commit 6663db4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 1 addition & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ if (process.env.NODE_ENV == 'production') {
config.pineconeAPIKey = process.env.pineconeAPIKey;
config.azureOpenAIAPIKey = process.env.azureOpenAIAPIKey;
config.azureEndpointURL = process.env.azureEndpointURL;
config.debugDisableEmbeddings = false;
hostPort = process.env.PORT ? process.env.PORT : 8080;
} else {
mongooseConnectionString = config.devMongoDBConnectionString;
Expand Down
8 changes: 0 additions & 8 deletions backendsrc/webDataHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -2143,24 +2143,18 @@ class WebDataHandler {
async getSimilarIssues(queryData) {
const { organizationName, repoName, issueTitle, issueBody } = queryData;

console.log("In data: ", queryData);

let issueDescription = GetDescription(issueTitle, issueBody) // to do rewrite to take in issue title and body

let dbRepoName = (organizationName + "/" + repoName).toLowerCase();

let repo = await this.RepoDetails.findOne({ shortURL: dbRepoName });

console.log("Repo short URL: ", repo.shortURL);

if (repo == null) {
throw "Repo not found";
}

let issue = await this.IssueDetails.findOne({ title: issueTitle, repoRef: repo._id });

console.log("Issue title if it exists: ", issue?.title);

let similarIssueIDArray = await this.embeddingsHandler.getSimilarIssueIDs(repo, issueDescription, issue);

// Make a new array that finds each issue with the id specified in the array above
Expand All @@ -2178,8 +2172,6 @@ class WebDataHandler {
}
});

console.log("Return array: ", returnArray);

return returnArray;
}
}
Expand Down

0 comments on commit 6663db4

Please sign in to comment.