{"id":32172440,"url":"https://github.com/puretype/github_webhook","last_synced_at":"2026-02-20T16:01:32.333Z","repository":{"id":226727441,"uuid":"768505043","full_name":"puretype/github_webhook","owner":"puretype","description":"An Elixir library to handle GitHub webhooks with ease","archived":false,"fork":false,"pushed_at":"2024-04-28T17:02:57.000Z","size":50,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T18:43:32.981Z","etag":null,"topics":["elixir","github","webhooks"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puretype.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["mwhitworth"]}},"created_at":"2024-03-07T07:56:45.000Z","updated_at":"2025-08-06T20:53:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"e12d0589-e069-4cda-9d62-c3dc67da70f9","html_url":"https://github.com/puretype/github_webhook","commit_stats":null,"previous_names":["puretype/github_webhook"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/puretype/github_webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puretype%2Fgithub_webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puretype%2Fgithub_webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puretype%2Fgithub_webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puretype%2Fgithub_webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puretype","download_url":"https://codeload.github.com/puretype/github_webhook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puretype%2Fgithub_webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29656589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T09:27:29.698Z","status":"ssl_error","status_checked_at":"2026-02-20T09:26:12.373Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","github","webhooks"],"created_at":"2025-10-21T18:37:09.032Z","updated_at":"2026-02-20T16:01:32.328Z","avatar_url":"https://github.com/puretype.png","language":"Elixir","readme":"# GitHubWebhook\n\nA fork from [gh_webhook_plug](https://github.com/emilsoman/gh_webhook_plug), with some additional functionality:\n\n- deserializes the payload into an Elixir data structure\n- pass along webhook headers in a keyword list\n- updates for OTP functionality and updated Elixir conventions\n- uses the `X-Hub-Signature-256` header for verification\n    - make sure that you have configured a secret for your webhook\n\n## Usage\n\nInside a Phoenix application, in the `Endpoint` module:\n\n```elixir\ndefmodule MyApp.Endpoint do\n\n  plug GitHubWebhook,\n    secret: \"secret\",\n    path: \"/github_webhook\",\n    action: {MyApp.GithubWebhook, :handle}\n\n  # Rest of the plugs\nend\n```\n\nso you can write the handler like so:\n\n```elixir\ndefmodule MyApp.GithubWebhook do\n  @spec handle(Plug.Conn.t(), map(), Keyword.t()) :: any()\n  def handle(conn, payload, opts) do\n    # Handle webhook payload here\n    # opts contains additional values from headers\n\n    # Return value of this function is ignored\n  end\nend\n```\n\n## Configuration\n\nThe below variables can be set in your `config/config.exs` or via options to the plug:\n\n```elixir\nconfig :github_webhook,\n  # Secret set in webhook settings page of the Github repository\n  secret: \"foobar\",\n  # Path that will be intercepted by GhWebhookPlug\n  path: \"/api/github_webhook\",\n  # Module and function that will be used to handle the webhook payload\n  action: {MyApp.GithubWebhook, :handle}\n```\n\nThe following options are read at compile-time, and so therefore must be set in `config/config.exs`:\n\n```elixir\nconfig :github_webhook,\n  # JSON library used for decoding the incoming request\n  json_library: Jason\n```\n\n## Installation\n\nThe package can be installed by adding `github_webhook` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:github_webhook, \"~\u003e 0.2\"}\n  ]\nend\n```\n\nThe docs can be found at \u003chttps://hexdocs.pm/github_webhook\u003e.\n","funding_links":["https://github.com/sponsors/mwhitworth"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuretype%2Fgithub_webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuretype%2Fgithub_webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuretype%2Fgithub_webhook/lists"}