resolves API, HTML and RAW Urls for GitHub repositories
By v-braun - www.dev-things.net.
Install-Package VBR.GitHubUrls
"dependencies": {
"VBR.GitHubUrls": "*"
}
See the VBR.GitHubUrls.Tests Project.
using VBR.GitHubUrls;
static Main(){
GitHubUrls urls;
urls = GitHubUrls.FromHtmlUrl("https://github.com/dotnet/core/");
// or:
urls = GitHubUrls.FromUserRepoString("dotnet/core/");
// or:
urls = GitHubUrls.FromUserNameAndRepo("dotnet", "core");
// urls:
// UserName = dotnet,
// RepositoryName = core,
// ApiUrl = $"https://api.github.com/repos/dotnet/core/",
// HtmlUrl = $"https://github.com/dotnet/core/",
// RawUrl = $"https://raw.githubusercontent.com/dotnet/core/",
// UserRepo = $"dotnet/core"
}
If you discover any bugs, feel free to create an issue on GitHub fork and send me a pull request.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
See LICENSE.