We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7d4cca commit 4d5b09bCopy full SHA for 4d5b09b
1 file changed
lib/code_corps/github/event/handler.ex
@@ -0,0 +1,16 @@
1
+defmodule CodeCorps.GitHub.Event.Handler do
2
+ @moduledoc ~S"""
3
+ Default behavior for all GitHub webhook event handlers.
4
+ """
5
+
6
+ alias CodeCorps.GithubEvent
7
8
+ @doc ~S"""
9
+ The only entry point a GitHub webhook event handler function should contain.
10
11
+ Receives a `CodeCorps.GithubEvent` record and a payload, returns an `:ok`
12
+ tuple if the process was successful, or an `:error` tuple, where the second
13
+ element is an atom, if it failed.
14
15
+ @callback handle(GithubEvent.t, map) :: {:ok, any} | {:error, atom}
16
+end
0 commit comments