Example #1
0
        public bool TryGetRepositoryInfo(HttpRequest request, JObject payload, out RepositoryInfo repositoryInfo)
        {
            // Look for the generic format
            // { url: "", branch: "", deployer: "", oldRef: "", newRef: "" }
            repositoryInfo = new RepositoryInfo
            {
                RepositoryUrl = payload.Value<string>("url"),
                Deployer = payload.Value<string>("deployer"),
                OldRef = payload.Value<string>("oldRef"),
                NewRef = payload.Value<string>("newRef")
            };

            return repositoryInfo.IsValid();
        }
 public virtual bool TryGetRepositoryInfo(HttpRequest request, JObject payload, out RepositoryInfo repositoryInfo)
 {
     repositoryInfo = GetRepositoryInfo(request, payload);
     return repositoryInfo != null && repositoryInfo.IsValid();
 }