-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added functionality for retrieving repositories for the authenticated…
… user. Closes #25
- Loading branch information
Showing
8 changed files
with
55 additions
and
9 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/GitHubLabelInitialiser/Extensions/ConvertToGitHubRepositoryExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using GitHubLabelInitialiser.Models; | ||
using Octokit; | ||
|
||
namespace GitHubLabelInitialiser.Extensions | ||
{ | ||
static class ConvertToGitHubRepositoryExtension | ||
{ | ||
public static GitHubRepository ConvertToGitHubRepository(this Repository repository) | ||
{ | ||
return new GitHubRepository | ||
{ | ||
Name = repository.Name | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
namespace GitHubLabelInitialiser | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using GitHubLabelInitialiser.Models; | ||
|
||
namespace GitHubLabelInitialiser | ||
{ | ||
public interface IRepositoryManager | ||
{ | ||
void GetAllForAuthenticatedUser(); | ||
Task<IList<GitHubRepository>> GetAllForAuthenticatedUser(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
{ | ||
public class GitHubRepository | ||
{ | ||
public string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters