Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 3e4e699

Browse files
Merge branch 'fixes/long-publish-error-message' into fixes/api-failure-switch-auth-view
2 parents 1c46709 + 9af0497 commit 3e4e699

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/PublishView.cs

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace GitHub.Unity
99
{
1010
class PublishView : Subview
1111
{
12-
private static readonly Vector2 viewSize = new Vector2(300, 250);
12+
private static readonly Vector2 viewSize = new Vector2(400, 350);
1313

1414
private const string WindowTitle = "Publish";
1515
private const string Header = "Publish this repository to GitHub";
@@ -228,11 +228,6 @@ public override void OnGUI()
228228

229229
GUILayout.Space(Styles.PublishViewSpacingHeight);
230230

231-
if (error != null)
232-
GUILayout.Label(error, Styles.ErrorLabel);
233-
234-
GUILayout.FlexibleSpace();
235-
236231
GUILayout.BeginHorizontal();
237232
{
238233
GUILayout.FlexibleSpace();
@@ -257,7 +252,7 @@ public override void OnGUI()
257252
{
258253
Logger.Error(ex, "Repository Create Error Type:{0}", ex.GetType().ToString());
259254

260-
error = GetPublishErrorMessage(ex);
255+
error = ex.Message;
261256
isBusy = false;
262257
return;
263258
}
@@ -281,18 +276,13 @@ public override void OnGUI()
281276
}
282277
GUILayout.EndHorizontal();
283278
GUILayout.Space(10);
284-
}
285-
EditorGUI.EndDisabledGroup();
286-
}
287279

288-
private string GetPublishErrorMessage(Exception ex)
289-
{
290-
if (ex.Message.StartsWith(PublishLimtPrivateRepositoriesError))
291-
{
292-
return PublishLimtPrivateRepositoriesError;
293-
}
280+
if (error != null)
281+
GUILayout.Label(error, Styles.ErrorLabel);
294282

295-
return ex.Message;
283+
GUILayout.FlexibleSpace();
284+
}
285+
EditorGUI.EndDisabledGroup();
296286
}
297287

298288
public override bool IsBusy

0 commit comments

Comments
 (0)