Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (23 sloc) 0.932 kb
using System.Web;
using Newtonsoft.Json.Linq;
namespace Kudu.Services.ServiceHookHandlers
{
public class GitHubHandler : GitHubCompatHandler
{
public override DeployAction TryParseDeploymentInfo(HttpRequestBase request, JObject payload, string targetBranch, out DeploymentInfo deploymentInfo)
{
deploymentInfo = null;
if (request.Headers["X-Github-Event"] != null)
{
GitDeploymentInfo gitDeploymentInfo = GetDeploymentInfo(request, payload, targetBranch);
deploymentInfo = gitDeploymentInfo;
return deploymentInfo == null || IsDeleteCommit(gitDeploymentInfo.NewRef) ? DeployAction.NoOp : DeployAction.ProcessDeployment;
}
return DeployAction.UnknownPayload;
}
protected override string GetDeployer(HttpRequestBase request)
{
return "GitHub";
}
}
}
Jump to Line
Something went wrong with that request. Please try again.