Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

asizikov/github-create-repository

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-create-repository

Some code to automate new repository creation and configuration

Build status

internal class Program
{
    private static void Main(string[] args)
    {
        Task.Run(() => TestAsync()).Wait();
    }

    public static async Task TestAsync()
    {
        var owner = "#";
        var password = "#";  //you can use access token (https://github.com/settings/tokens)
        var client = new GitHubClient(new ProductHeaderValue("tool"));
        client.Credentials = new Credentials(owner, password);
        var configuration = new ConfigurationProvider(owner, "github-create-repository-configuration");
        var config = await configuration.GetConfigurationAsync(client);
        System.Console.WriteLine(config.version);

        var task = new CreateNewRepositoryTask(client, config);
        var repository = await task.CreateAsync("hello-new-repo");
        System.Console.WriteLine("Browse the repository at: " + repository);
        System.Console.ReadLine();
    }
}

About

Some code to automate new repository creation and configuration

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages