コード例 #1
0
        public static List <Reference> GetCommitData(GitHubArgs args)
        {
            var destination = Repository.Init(args.LocalRepoPath);
            var repo        = new Repository(destination);

            return(repo.Network.ListReferences(args.RemoteRepoPath).ToList());
        }
コード例 #2
0
        public static async Task <HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequestMessage req, TraceWriter log)
        {
            var args = new GitHubArgs(req);
            var data = GitHubCommits.GetCommitData(args);

            return(data == null
                ? req.CreateResponse(HttpStatusCode.NoContent, "No data")
                : req.CreateResponse(HttpStatusCode.OK, data));
        }