Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using correct public repo pull and implementing the icon property. #256

Merged
merged 5 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/GitHubExtension/Assets/GitHubLogo_Dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/GitHubExtension/GitHubExtension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
</ItemGroup>

<ItemGroup>
<Folder Include="Assets\" />
<Folder Include="Widgets\Assets\" />
</ItemGroup>

Expand Down
9 changes: 2 additions & 7 deletions src/GitHubExtension/Providers/RepositoryProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,9 @@ public IRandomAccessStreamReference Icon
get; private set;
}

public RepositoryProvider(IRandomAccessStreamReference icon)
{
Icon = icon;
}

public RepositoryProvider()
{
Icon = RandomAccessStreamReference.CreateFromUri(new Uri("https://www.GitHub.com/microsoft/devhome"));
Icon = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///GitHubExtension/Assets/GitHubLogo_Dark.png"));
}

public IAsyncOperation<RepositoryUriSupportResult> IsUriSupportedAsync(Uri uri)
Expand Down Expand Up @@ -84,7 +79,7 @@ IAsyncOperation<RepositoriesResult> IRepositoryProvider.GetRepositoriesAsync(IDe

// Gets only public repos for the owned repos.
request.Visibility = RepositoryRequestVisibility.Public;
var getPublicReposTask = client.Repository.GetAllForUser(developerId.LoginId, apiOptions);
var getPublicReposTask = client.Repository.GetAllForCurrent(request, apiOptions);

// this is getting private org and user repos.
request.Visibility = RepositoryRequestVisibility.Private;
Expand Down