All Projects β†’ go-playground β†’ Webhooks

go-playground / Webhooks

Licence: mit
🎣 Webhook receiver for GitHub, Bitbucket, GitLab, Gogs

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Webhooks

Vssue
πŸ“« A Vue-powered Issue-based Comment Plugin
Stars: ✭ 496 (-17.47%)
Mutual labels:  gitlab, bitbucket
Generic Webhook Trigger Plugin
Can receive any HTTP request, extract any values from JSON or XML and trigger a job with those values available as variables. Works with GitHub, GitLab, Bitbucket, Jira and many more.
Stars: ✭ 287 (-52.25%)
Mutual labels:  gitlab, bitbucket
snk.dev-assistant
Assistant for code development with advanced machine learning features
Stars: ✭ 14 (-97.67%)
Mutual labels:  gitlab, bitbucket
vpr
VPR is a CLI that helps you to quickly manage your project in GitHub/GitLab/Bitbucket
Stars: ✭ 17 (-97.17%)
Mutual labels:  gitlab, bitbucket
Ghorg
Quickly clone an entire org/users repositories into one directory - Supports GitHub, GitLab, Bitbucket, and more
Stars: ✭ 377 (-37.27%)
Mutual labels:  gitlab, bitbucket
myyearwithgit
δ»£η δ»“εΊ“εΉ΄η»ˆζ€»η»“ζŠ₯ε‘Šγ€‚
Stars: ✭ 176 (-70.72%)
Mutual labels:  gitlab, bitbucket
Skyhook
Parses webhooks and forwards them in the proper format to Discord.
Stars: ✭ 263 (-56.24%)
Mutual labels:  gitlab, bitbucket
froggit-go
Froggit-Go is a universal Go library, allowing to perform actions on VCS providers.
Stars: ✭ 19 (-96.84%)
Mutual labels:  gitlab, bitbucket
Danger
🚫 Stop saying "you forgot to …" in code review (in Ruby)
Stars: ✭ 4,691 (+680.53%)
Mutual labels:  gitlab, bitbucket
Oauth
πŸ”— OAuth 2.0 implementation for various providers in one place.
Stars: ✭ 336 (-44.09%)
Mutual labels:  gitlab, bitbucket
github-templates
Good templates for the issue, pull request, and contributing templates on GitHub, GitLab, and Bitbucket.
Stars: ✭ 65 (-89.18%)
Mutual labels:  gitlab, bitbucket
Codestream
The Code Collaboration Tool Built for Remote Teams
Stars: ✭ 459 (-23.63%)
Mutual labels:  gitlab, bitbucket
pm2-githook
receive webhook from github/gitlab and ask pm2 to reload the application for you
Stars: ✭ 39 (-93.51%)
Mutual labels:  gitlab, bitbucket
go-scm
Package scm provides a unified interface to multiple source code management systems.
Stars: ✭ 117 (-80.53%)
Mutual labels:  gitlab, bitbucket
feater
Tool for rapid deployment of selected features of your web application to isolated testing or demo environments.
Stars: ✭ 27 (-95.51%)
Mutual labels:  gitlab, bitbucket
Github Updater
This WP plugin will update GitHub, Bitbucket, GitLab, and Gitea hosted plugins and themes
Stars: ✭ 2,893 (+381.36%)
Mutual labels:  gitlab, bitbucket
gitcolombo
🧬 Extract and analyze contributors info from git repos
Stars: ✭ 55 (-90.85%)
Mutual labels:  gitlab, bitbucket
git-the-lines
A Discord bot that prints out the lines referenced in a GitHub, GitLab, or BitBucket snippet link
Stars: ✭ 37 (-93.84%)
Mutual labels:  gitlab, bitbucket
Reviewdog
🐢 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+655.57%)
Mutual labels:  gitlab, bitbucket
Git Deploy
Php Script for Auto-Pull in server (Using WebHook from GitLab, GitHub and Bitbucket)
Stars: ✭ 495 (-17.64%)
Mutual labels:  gitlab, bitbucket

Library webhooks

Project status Build Status Coverage Status Go Report Card GoDoc License

Library webhooks allows for easy receiving and parsing of GitHub, Bitbucket and GitLab Webhook Events

Features:

  • Parses the entire payload, not just a few fields.
  • Fields + Schema directly lines up with webhook posted json

Notes:

  • Currently only accepting json payloads.

Installation

Use go get.

go get -u gopkg.in/go-playground/webhooks.v5

Then import the package into your own code.

import "gopkg.in/go-playground/webhooks.v5"

Usage and Documentation

Please see http://godoc.org/gopkg.in/go-playground/webhooks.v5 for detailed usage docs.

Examples:
package main

import (
	"fmt"

	"net/http"

	"gopkg.in/go-playground/webhooks.v5/github"
)

const (
	path = "/webhooks"
)

func main() {
	hook, _ := github.New(github.Options.Secret("MyGitHubSuperSecretSecrect...?"))

	http.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
		payload, err := hook.Parse(r, github.ReleaseEvent, github.PullRequestEvent)
		if err != nil {
			if err == github.ErrEventNotFound {
				// ok event wasn;t one of the ones asked to be parsed
			}
		}
		switch payload.(type) {

		case github.ReleasePayload:
			release := payload.(github.ReleasePayload)
			// Do whatever you want from here...
			fmt.Printf("%+v", release)

		case github.PullRequestPayload:
			pullRequest := payload.(github.PullRequestPayload)
			// Do whatever you want from here...
			fmt.Printf("%+v", pullRequest)
		}
	})
	http.ListenAndServe(":3000", nil)
}

Contributing

Pull requests for other services are welcome!

If the changes being proposed or requested are breaking changes, please create an issue for discussion.

License

Distributed under MIT License, please see license file in code for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].