Skip to content

Commit 0c83914

Browse files
committed
[dashboard] Request the correct scope when trying to access private repos on GitHub Enterprise
1 parent 3fc47b4 commit 0c83914

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/dashboard/src/start/CreateWorkspace.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ function RepositoryNotFoundView(p: { error: StartWorkspaceError }) {
258258
}
259259

260260
// TODO: this should be aware of already granted permissions
261-
const missingScope = authProvider.host === 'github.com' ? 'repo' : 'read_repository';
261+
const missingScope = authProvider.authProviderType === 'GitHub' ? 'repo' : 'read_repository';
262262
const authorizeURL = gitpodHostUrl.withApi({
263263
pathname: '/authorize',
264264
search: `returnTo=${encodeURIComponent(window.location.toString())}&host=${host}&scopes=${missingScope}`

0 commit comments

Comments
 (0)