Skip to content

Commit af780e9

Browse files
AlexTugarevroboquat
authored andcommitted
[projects] unblock if project config cannot be fetched
1 parent 9fb03bd commit af780e9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/dashboard/src/projects/ConfigureProject.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ export default function () {
111111
setShowAuthBanner({ host: new URL(project.cloneUrl).hostname });
112112
} else {
113113
console.error('Getting project configuration failed', error);
114+
setIsDetecting(false);
115+
setIsEditorDisabled(true);
116+
setEditorMessage(<EditorMessage type="warning" heading="Project type could not be detected." message="Fetching project information failed." />);
117+
setGitpodYml(TASKS.Other);
114118
}
115119
}
116120
})();
@@ -160,7 +164,7 @@ export default function () {
160164

161165
const onConfirmShowAuthModal = async (host: string, scope?: string) => {
162166
setShowAuthBanner(undefined);
163-
await tryAuthorize({host, onSuccess: async () => {
167+
await tryAuthorize({host, scope, onSuccess: async () => {
164168
// update remote session
165169
await getGitpodService().reconnect();
166170

@@ -259,7 +263,7 @@ export default function () {
259263
No Access
260264
</div>
261265
<div className="text-center dark:text-gray-400 pb-3">
262-
Authorize {showAuthBanner.host} <br />{showAuthBanner.scope ? (<>and grant <strong>{showAuthBanner.scope}</strong> permission</>) : ""} to access project configuration.
266+
Authorize {showAuthBanner.host} {showAuthBanner.scope ? (<>and grant <strong>{showAuthBanner.scope}</strong> permission</>) : ""} <br /> to access project configuration.
263267
</div>
264268
<button className={`primary mr-2 py-2`} onClick={() => onConfirmShowAuthModal(showAuthBanner.host, showAuthBanner.scope)}>Authorize Provider</button>
265269
</div>

0 commit comments

Comments
 (0)