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

Integrated gogs webhook deletion #1752

Closed
wants to merge 3 commits into from
Closed

Integrated gogs webhook deletion #1752

wants to merge 3 commits into from

Conversation

tboerger
Copy link

Fixes #1603

@tboerger tboerger mentioned this pull request Aug 11, 2016
@bradrydzewski
Copy link

awesome, thanks for working on this one! I think we might need to mirror this after the GitHub hook removal as well. Notice we have logic to find the matching hook:
https://github.com/drone/drone/blob/master/remote/github/github.go#L238

the matching hooks function parses the URL to remove the token from the url query string. Otherwise it won't properly match the link that is passed in
https://github.com/drone/drone/blob/master/remote/github/github.go#L314

EDIT: I'm looking at your implementation and it does look like the HasPrefix might work fine. Perhaps for consistency we can break into a helper function similar to the GitHub implementation?

@tboerger
Copy link
Author

I will do it the same like GitHub. And than I have to fix the tests, looks like there have been something broken because of the client update.

@tboerger
Copy link
Author

@bradrydzewski I don't get the tests running correctly but at least the deletion of webhooks works now. Maybe you can do a small addition afterwards to get the tests correct since you are deeper in it?

@bradrydzewski
Copy link

what issues are you seeing w/ the unit tests? maybe I can help

@@ -255,3 +270,25 @@ func (c *client) newClientToken(token string) *gogs.Client {
}
return client
}

// helper function to return matching hook.
func matchingHooks(hooks []*gogs.Hook, rawurl string) *gogs.Hook {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MorphBonehunter
Copy link

@tboerger could you please take a look at this again?

@tboerger
Copy link
Author

@tboerger could you please take a look at this again?

A little bit busy at the moment, but I try to come back ASAP.

@vtolstov
Copy link

vtolstov commented Mar 7, 2017

any progress in this pr?

@tboerger
Copy link
Author

tboerger commented Mar 9, 2017

Sorry, I forgot about this PR.

@vtolstov
Copy link

does this needs to be merged before gitea driver?

@tboerger
Copy link
Author

Closing this in favor of go-scm

@tboerger tboerger closed this Jul 11, 2018
@tboerger tboerger deleted the feature/gogs-webhook-delete branch July 11, 2018 13:11
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

Successfully merging this pull request may close these issues.

None yet

4 participants