Which Octokit class to use to receive a GitHub webhook push?

436 Views Asked by At

I've got an ASP.NET MVC action method to receive a GitHub webhook push. I've configured my repo to send this POST when it's been updated.

Which Octokit.Net class do I need to use as a parameter to this action method? The docs say it's the pushevent class, but I cannot find this anywhere in the Octokit namespace.

I'd rather use an Octokit class (or the most appropriate class) as a param than scrape from Request if possible.

[HttpPost]
public ActionResult ReceiveFromGitHub()
{
   //which Octokit class to use in method signature?
   //catch the call from GitHub, do stuff.
   DoStuffWithJsonPosted(); 
   return new HttpStatusCodeResult(HttpStatusCode.OK);
}

Using the current version of Octokit (0.3.4) via NuGet as of this post date (Jun 2014).

Does Octokit.NET have the webhook classes yet?

1

There are 1 best solutions below

1
On

The Octokit.net hasn't yet implemented the webhook classes but that's something we'd love for someone to contribute! :)