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

Commit e24d554

Browse files
Adding a default text to the user/organizations dropdown
1 parent 6c0791f commit e24d554

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ class PublishView : Subview
1212
private const string PrivateRepoMessage = "You choose who can see and commit to this repository";
1313
private const string PublicRepoMessage = "Anyone can see this repository. You choose who can commit";
1414
private const string PublishViewCreateButton = "Create";
15+
private const string OwnersDefaultText = "Select a user or organization";
1516

1617
[SerializeField] private string username;
17-
[SerializeField] private string[] owners = { };
18+
[SerializeField] private string[] owners = { OwnersDefaultText };
1819
[SerializeField] private int selectedOwner;
1920
[SerializeField] private string repoName = String.Empty;
2021
[SerializeField] private string repoDescription = "";
@@ -70,7 +71,7 @@ private void PopulateView()
7071
return;
7172
}
7273

73-
owners = new[] { user.Login };
74+
owners = owners.Union(new[] { user.Login }).ToArray();
7475
username = user.Login;
7576

7677
Logger.Trace("GetOrganizations");

0 commit comments

Comments
 (0)