Beispiel #1
0
        // todos (Dhyan)
        // Gitlab - https://docs.gitlab.com/ee/api/README.html
        // Github - https://developer.github.com/v3/
        // Create Github repo through the api and get the repository name (Done)
        // Push to github from temp file (Done)
        // Transfer wikis using the same method as repos (Done)
        // Investigate rate limiting for issue creation.

        // Create wiki page for merge request comments

        static async Task <int> Main(string[] args)
        {
            Setup();

            Console.WriteLine("Creating Repo on Github...");
            var repoName = await GitHubApi.CreateRepository(
                _config["Github:RepoName"],
                _config["Github:RepoDescription"]);

            Console.WriteLine("Transferring Repo...");
            await TransferRepository(repoName);

            if (!string.IsNullOrEmpty(_config.GetSection("Gitlab")["Wiki"]))
            {
                Console.WriteLine(
                    "You will need to visit the repo's wiki page and create a default page with no content." +
                    "This will get overwritten. Here's the link:\n" +
                    $"https://github.com/satech-uic/{repoName}/wiki\n" +
                    "Press enter when done.");
                Console.ReadLine();

                Console.WriteLine("Transferring Wiki...");
                await TransferWiki(repoName);
            }

            Console.WriteLine("Transferring issues...");
            await TransferIssues(repoName);


            // var repoName = await GitHubApi.CreateRepository("test-repo2", "This is a test repository!");


            // await TransferIssues("lrs-api");


            return(0);
        }