
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
github.com/go-playground/webhooks/v6
Library webhooks allows for easy receiving and parsing of GitHub, Bitbucket, GitLab, Docker Hub, Gogs and Azure DevOps Webhook Events
Features:
Notes:
Use go get.
go get -u github.com/go-playground/webhooks/v6
Then import the package into your own code.
import "github.com/go-playground/webhooks/v6"
Please see http://godoc.org/github.com/go-playground/webhooks/v6 for detailed usage docs.
package main
import (
"fmt"
"net/http"
"github.com/go-playground/webhooks/v6/github"
)
const (
path = "/webhooks"
)
func main() {
hook, _ := github.New(github.Options.Secret("MyGitHubSuperSecretSecret...?"))
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)
}
Pull requests for other services are welcome!
If the changes being proposed or requested are breaking changes, please create an issue for discussion.
Distributed under MIT License, please see license file in code for more details.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.