Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any plans to support manage wehook #134

Closed
LinuxSuRen opened this issue Dec 20, 2021 · 2 comments
Closed

Any plans to support manage wehook #134

LinuxSuRen opened this issue Dec 20, 2021 · 2 comments

Comments

@LinuxSuRen
Copy link
Contributor

It would be great to support adding, deleting, updating a webhook of a git provider.

I'd be happy to help with this.

@bradrydzewski
Copy link
Member

👋 hey there, this is currently supported by this package:
https://pkg.go.dev/github.com/drone/go-scm@v1.16.2/scm#example-Hook-Create

note that when creating hooks you should use NativeEvents since Events is being deprecated:

	input := &scm.HookInput{
		Name:       "CI",
		Target:     "https://ci.example.com",
		Secret:     "topsecret",
		SkipVerify: false,
		NativeEvents: []string{"issue_comment", "issues"},
	}

	_, _, err = client.Repositories.CreateHook(ctx, "octocat/Hello-World", input)
`

@LinuxSuRen
Copy link
Contributor Author

hi @bradrydzewski , thanks for your quick response. Sorry I didn't go through the whole repo. I just try to find it from WebService interface

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants