How to set hook using drone API?


this api to set gogs webhook failed…

drone version 0.7

	repo := e.Group("/api/repos/:owner/:name")

		repo.POST("", session.MustRepoAdmin(), server.PostRepo)

How to use drone this API?

Sorry I’m not sure I understand the question. Can you please clarify?

I want to set repo hook by drone API, not through drone UI, Our system want to integrate drone, but you know the drone API reference document is not complete。 So I want to know how to set it。Now I solved this problem.

When in doubt, the best way to learn about an API endpoint is to the look at the official Go client. For example, here is the method that activates a repository:

You should be able to use the CLI as well.

drone repo add a/b