This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class PublishView : Subview
2121 private const string RepositoryNameLabel = "Repository Name" ;
2222 private const string DescriptionLabel = "Description" ;
2323 private const string CreatePrivateRepositoryLabel = "Make repository private" ;
24- private const string PublishLimtPrivateRepositoriesError = "You are currently at your limt of private repositories" ;
24+ private const string PublishLimitPrivateRepositoriesError = "You are currently at your limit of private repositories" ;
2525
2626 [ SerializeField ] private string username ;
2727 [ SerializeField ] private string [ ] owners = { OwnersDefaultText } ;
@@ -177,7 +177,7 @@ public override void OnGUI()
177177 {
178178 Logger . Error ( ex , "Repository Create Error Type:{0}" , ex . GetType ( ) . ToString ( ) ) ;
179179
180- error = ex . Message ;
180+ error = GetPublishErrorMessage ( ex ) ;
181181 isBusy = false ;
182182 return ;
183183 }
@@ -210,6 +210,16 @@ public override void OnGUI()
210210 EditorGUI . EndDisabledGroup ( ) ;
211211 }
212212
213+ private string GetPublishErrorMessage ( Exception ex )
214+ {
215+ if ( ex . Message . StartsWith ( PublishLimitPrivateRepositoriesError ) )
216+ {
217+ return PublishLimitPrivateRepositoriesError ;
218+ }
219+
220+ return ex . Message ;
221+ }
222+
213223 public override bool IsBusy
214224 {
215225 get { return isBusy ; }
You can’t perform that action at this time.
0 commit comments