Skip to content

Commit 9496b28

Browse files
Copilotalexr00
andcommitted
Address code review feedback: improve error logging and explicitly pass GitHub repository
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent ac78fde commit 9496b28

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/issues/issueFeatureRegistrar.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,9 @@ export class IssueFeatureRegistrar extends Disposable {
10091009
const folderManager = this.manager.getManagerForFile(document.uri);
10101010
if (folderManager) {
10111011
try {
1012-
const currentUser = await folderManager.getCurrentUser();
1012+
// Get the GitHub repository for the document to ensure we get the correct user
1013+
const githubRepository = folderManager.gitHubRepositories[0];
1014+
const currentUser = await folderManager.getCurrentUser(githubRepository);
10131015
if (currentUser?.login) {
10141016
// Add current user to assignees if not already included
10151017
if (!assignees) {
@@ -1020,7 +1022,7 @@ export class IssueFeatureRegistrar extends Disposable {
10201022
}
10211023
} catch (error) {
10221024
// If we can't get the current user, just continue without auto-assignment
1023-
Logger.debug(`Failed to get current user for auto-assignment: ${error}`, IssueFeatureRegistrar.ID);
1025+
Logger.debug('Failed to get current user for auto-assignment', IssueFeatureRegistrar.ID, error);
10241026
}
10251027
}
10261028
}

0 commit comments

Comments
 (0)