Skip to content

Commit

Permalink
Updated logs
Browse files Browse the repository at this point in the history
  • Loading branch information
craigloewen-msft committed Apr 15, 2024
1 parent 90e17f1 commit 63d4550
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions backendsrc/embeddingsHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class embeddingsHandler {
const description = [issueDescription];

if (this.debugDisableEmbeddings) {
console.log("Embeddings are disabled")
return [];
}

Expand Down
8 changes: 5 additions & 3 deletions backendsrc/webDataHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -2143,21 +2143,23 @@ 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("Started getsimilarissues request");
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("Got issue");
console.log("Issue title if it exists: ", issue?.title);

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

Expand All @@ -2176,7 +2178,7 @@ class WebDataHandler {
}
});

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

return returnArray;
}
Expand Down

0 comments on commit 63d4550

Please sign in to comment.