{"id":13414093,"url":"https://github.com/go-playground/webhooks","last_synced_at":"2025-04-09T03:09:29.354Z","repository":{"id":2070421,"uuid":"44921231","full_name":"go-playground/webhooks","owner":"go-playground","description":":fishing_pole_and_fish: Webhook receiver for GitHub, Bitbucket, GitLab, Gogs","archived":false,"fork":false,"pushed_at":"2024-08-06T17:04:34.000Z","size":593,"stargazers_count":978,"open_issues_count":38,"forks_count":239,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-02T02:08:36.251Z","etag":null,"topics":["bitbucket","github","gitlab","webhooks"],"latest_commit_sha":null,"homepage":"","language":"Go","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/go-playground.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2015-10-25T17:38:13.000Z","updated_at":"2025-04-01T17:19:00.000Z","dependencies_parsed_at":"2023-07-05T19:48:04.315Z","dependency_job_id":"2d260b61-c6c9-4277-8206-a01ef278a8fc","html_url":"https://github.com/go-playground/webhooks","commit_stats":{"total_commits":231,"total_committers":80,"mean_commits":2.8875,"dds":0.8268398268398268,"last_synced_commit":"53694f85d27d5446a0790b0408b6799ac9709b98"},"previous_names":["joeybloggs/webhooks"],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-playground%2Fwebhooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-playground%2Fwebhooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-playground%2Fwebhooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-playground%2Fwebhooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-playground","download_url":"https://codeload.github.com/go-playground/webhooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246866098,"owners_count":20846496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bitbucket","github","gitlab","webhooks"],"created_at":"2024-07-30T20:01:57.475Z","updated_at":"2025-04-09T03:09:29.332Z","avatar_url":"https://github.com/go-playground.png","language":"Go","readme":"Library webhooks\n================\n\u003cimg align=\"right\" src=\"https://raw.githubusercontent.com/go-playground/webhooks/v6/logo.png\"\u003e![Project status](https://img.shields.io/badge/version-6.3.0-green.svg)\n[![Test](https://github.com/go-playground/webhooks/workflows/Test/badge.svg?branch=master)](https://github.com/go-playground/webhooks/actions)\n[![Coverage Status](https://coveralls.io/repos/go-playground/webhooks/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/go-playground/webhooks?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/go-playground/webhooks)](https://goreportcard.com/report/go-playground/webhooks)\n[![GoDoc](https://godoc.org/github.com/go-playground/webhooks/v6?status.svg)](https://godoc.org/github.com/go-playground/webhooks/v6)\n![License](https://img.shields.io/dub/l/vibe-d.svg)\n\nLibrary webhooks allows for easy receiving and parsing of GitHub, Bitbucket, GitLab, Docker Hub, Gogs and Azure DevOps Webhook Events\n\nFeatures:\n\n* Parses the entire payload, not just a few fields.\n* Fields + Schema directly lines up with webhook posted json\n\nNotes:\n\n* Currently only accepting json payloads.\n\nInstallation\n------------\n\nUse go get.\n\n```shell\ngo get -u github.com/go-playground/webhooks/v6\n```\n\nThen import the package into your own code.\n\n\timport \"github.com/go-playground/webhooks/v6\"\n\nUsage and Documentation\n------\n\nPlease see http://godoc.org/github.com/go-playground/webhooks/v6 for detailed usage docs.\n\n##### Examples:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"net/http\"\n\n\t\"github.com/go-playground/webhooks/v6/github\"\n)\n\nconst (\n\tpath = \"/webhooks\"\n)\n\nfunc main() {\n\thook, _ := github.New(github.Options.Secret(\"MyGitHubSuperSecretSecret...?\"))\n\n\thttp.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {\n\t\tpayload, err := hook.Parse(r, github.ReleaseEvent, github.PullRequestEvent)\n\t\tif err != nil {\n\t\t\tif err == github.ErrEventNotFound {\n\t\t\t\t// ok event wasn't one of the ones asked to be parsed\n\t\t\t}\n\t\t}\n\t\tswitch payload.(type) {\n\n\t\tcase github.ReleasePayload:\n\t\t\trelease := payload.(github.ReleasePayload)\n\t\t\t// Do whatever you want from here...\n\t\t\tfmt.Printf(\"%+v\", release)\n\n\t\tcase github.PullRequestPayload:\n\t\t\tpullRequest := payload.(github.PullRequestPayload)\n\t\t\t// Do whatever you want from here...\n\t\t\tfmt.Printf(\"%+v\", pullRequest)\n\t\t}\n\t})\n\thttp.ListenAndServe(\":3000\", nil)\n}\n\n```\n\nContributing\n------\n\nPull requests for other services are welcome!\n\nIf the changes being proposed or requested are breaking changes, please create an issue for discussion.\n\nLicense\n------\n\nDistributed under MIT License, please see license file in code for more details.\n","funding_links":[],"categories":["Third-party APIs","Go","github","第三方API`第三方API 汇总`","第三方API","Utility","第三方api","\u003cspan id=\"第三方api-third-party-apis\"\u003e第三方API Third-party APIs\u003c/span\u003e"],"sub_categories":["HTTP Clients","Utility/Miscellaneous","Advanced Console UIs","查询语","实用程序/Miscellaneous","Fail injection","交流","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-playground%2Fwebhooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-playground%2Fwebhooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-playground%2Fwebhooks/lists"}