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

Commit f726c7f

Browse files
No need to use the UriString when the string is available
1 parent f81d00f commit f726c7f

File tree

1 file changed

+5
-5
lines changed
  • src/UnityExtension/Assets/Editor/GitHub.Unity/UI

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ public override void Update()
187187

188188
private void MaybeUpdateData()
189189
{
190-
string updatedRepoBranch = null;
191190
string updatedRepoRemote = null;
192191
string updatedRepoUrl = DefaultRepoUrl;
193192

@@ -200,15 +199,16 @@ private void MaybeUpdateData()
200199
hasRunMaybeUpdateDataWithRepository = true;
201200

202201
var repositoryCurrentBranch = Repository.CurrentBranch;
203-
updatedRepoBranch = repositoryCurrentBranch.HasValue ? repositoryCurrentBranch.Value.Name : null;
204-
205-
var repositoryCloneUrl = Repository.CloneUrl;
206-
updatedRepoUrl = repositoryCloneUrl != null ? repositoryCloneUrl.ToString() : DefaultRepoUrl;
202+
var updatedRepoBranch = repositoryCurrentBranch.HasValue ? repositoryCurrentBranch.Value.Name : null;
207203

208204
var repositoryCurrentRemote = Repository.CurrentRemote;
209205
if (repositoryCurrentRemote.HasValue)
210206
{
211207
updatedRepoRemote = repositoryCurrentRemote.Value.Name;
208+
if (repositoryCurrentRemote.Value.Url != null)
209+
{
210+
updatedRepoUrl = repositoryCurrentRemote.Value.Url;
211+
}
212212
}
213213

214214
if (repoRemote != updatedRepoRemote)

0 commit comments

Comments
 (0)