Skip to content

Commit ea32d09

Browse files
committed
Pass owner type information to language server
1 parent 77cf775 commit ea32d09

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/git/repository.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ export interface GitHubRepoContext {
127127
owner: string;
128128
name: string;
129129

130+
organizationOwned: boolean;
131+
130132
defaultBranch: string;
131133
}
132134

@@ -173,7 +175,8 @@ export async function getGitHubContext(): Promise<GitHubContext | undefined> {
173175
name: protocolInfo.protocol.repositoryName,
174176
owner: protocolInfo.protocol.owner,
175177
id: repoInfo.data.id,
176-
defaultBranch: `refs/heads/${repoInfo.data.default_branch}`
178+
defaultBranch: `refs/heads/${repoInfo.data.default_branch}`,
179+
organizationOwned: repoInfo.data.owner.type === "Organization"
177180
};
178181
})
179182
);

src/workflow/languageServer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export async function initLanguageServer(context: vscode.ExtensionContext) {
2727
id: repo.id,
2828
owner: repo.owner,
2929
name: repo.name,
30-
workspaceUri: repo.workspaceUri.toString()
30+
workspaceUri: repo.workspaceUri.toString(),
31+
organizationOwned: repo.organizationOwned
3132
})),
3233
logLevel: PRODUCTION ? LogLevel.Warn : LogLevel.Debug
3334
};

0 commit comments

Comments
 (0)