Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
Unity
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shane Veasy
Unity
Commits
9c85264d
Commit
9c85264d
authored
7 years ago
by
Stanley Goldman
Browse files
Options
Downloads
Patches
Plain Diff
Temporary changes to ensure we set isBusy to false on the correct thread
parent
0e489246
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/GitHub.Api/Application/ApiClient.cs
+13
-7
13 additions, 7 deletions
src/GitHub.Api/Application/ApiClient.cs
src/UnityExtension/Assets/Editor/GitHub.Unity/UI/PUblishView.cs
+5
-6
5 additions, 6 deletions
...ityExtension/Assets/Editor/GitHub.Unity/UI/PUblishView.cs
with
18 additions
and
13 deletions
src/GitHub.Api/Application/ApiClient.cs
+
13
−
7
View file @
9c85264d
...
...
@@ -61,7 +61,15 @@ namespace GitHub.Unity
public
async
Task
CreateRepository
(
NewRepository
newRepository
,
Action
<
Octokit
.
Repository
,
Exception
>
callback
,
string
organization
=
null
)
{
Guard
.
ArgumentNotNull
(
callback
,
"callback"
);
await
CreateRepositoryInternal
(
newRepository
,
callback
,
organization
);
try
{
var
repository
=
await
CreateRepositoryInternal
(
newRepository
,
organization
);
callback
(
repository
,
null
);
}
catch
(
Exception
e
)
{
callback
(
null
,
e
);
}
}
public
async
Task
GetOrganizations
(
Action
<
IList
<
Organization
>>
callback
)
...
...
@@ -174,7 +182,7 @@ namespace GitHub.Unity
return
result
.
Code
==
LoginResultCodes
.
Success
;
}
private
async
Task
CreateRepositoryInternal
(
NewRepository
newRepository
,
Action
<
Octokit
.
Repository
,
Exception
>
callback
,
string
organization
)
private
async
Task
<
Octokit
.
Repository
>
CreateRepositoryInternal
(
NewRepository
newRepository
,
string
organization
)
{
try
{
...
...
@@ -182,8 +190,7 @@ namespace GitHub.Unity
if
(!
await
EnsureKeychainLoaded
())
{
callback
(
null
,
new
Exception
(
"Keychain Not Loaded"
));
return
;
return
null
;
}
Octokit
.
Repository
repository
;
...
...
@@ -201,13 +208,12 @@ namespace GitHub.Unity
}
logger
.
Trace
(
"Created Repository"
);
callback
(
repository
,
null
);
return
repository
;
}
catch
(
Exception
ex
)
{
logger
.
Error
(
ex
,
"Error Creating Repository"
);
callback
(
null
,
ex
)
;
throw
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/UnityExtension/Assets/Editor/GitHub.Unity/UI/PUblishView.cs
+
5
−
6
View file @
9c85264d
...
...
@@ -74,6 +74,7 @@ namespace GitHub.Unity
if
(
user
==
null
)
{
Logger
.
Warning
(
"Unable to get current user"
);
isBusy
=
false
;
return
;
}
...
...
@@ -82,24 +83,22 @@ namespace GitHub.Unity
Logger
.
Trace
(
"GetOrganizations"
);
Client
.
GetOrganizations
(
organizations
=>
{
Client
.
GetOrganizations
(
organizations
=>
{
if
(
organizations
==
null
)
{
Logger
.
Warning
(
"Unable to get list of organizations"
);
isBusy
=
false
;
return
;
}
Logger
.
Trace
(
"Loaded {0} organizations"
,
organizations
.
Count
);
var
organizationLogins
=
organizations
.
OrderBy
(
organization
=>
organization
.
Login
)
.
Select
(
organization
=>
organization
.
Login
);
.
OrderBy
(
organization
=>
organization
.
Login
).
Select
(
organization
=>
organization
.
Login
);
owners
=
owners
.
Union
(
organizationLogins
).
ToArray
();
isBusy
=
false
;
});
}).
Finally
(
task
=>
{
isBusy
=
false
;
});
}
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment