-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Test fails: should create a project from github and run its first test #495
Comments
The login works. But yeah, maybe something is down.. Checking status page now. Edit: status seems fine. |
Merge #494 before tackling this, since that fixes other test issues. |
This is the response received from github: {
message: 'Validation Failed',
documentation_url: 'https://developer.github.com/v3/repos/hooks/#create-a-hook',
errors: [
{
resource: 'Hook',
code: 'custom',
message: 'The "push" event cannot have more than 20 hooks'
}, {
resource: 'Hook',
code: 'custom',
message: 'The "pull_request" event cannot have more than 20 hooks'
}, {
resource: 'Hook',
code: 'custom',
message: 'The "issue_comment" event cannot have more than 20 hooks'
}
]
} |
Nice work @knownasilya ! Yeah definitely not a strider bug. I've run into this before as Github limits your # of total project hooks. Honestly I wouldn't do any #DELETE calls to their API even though you can --adding that logic will be cluttery and dangerous (what if it deletes the wrong webhook, what if it thinks it deleted it but something added another and you're still at the 20 limit) -- instead what we should do is forward the correct error to the user and let them deal with it. I'd only go so far as to give the user a link to his webhooks settings page. Thoughts? |
Well we could check if the hook exists, if the API allows that functionality? And just not add the hook if it's already there. But I think your idea might be better. |
It does allow it, you would need to store the "id" when you make the POST call ( see response: https://developer.github.com/v3/repos/hooks/#response-2 ) but what I'm saying is that it's a better virtue to do few features well, with good errors, than to do many features poorly, with poor errors. in this particular case i would rather we propogate the error from github to the user directly rather than widen Strider's scope. Also consider if the webhooks are from 20 other services, we dont have an ID for any of them. then what? |
@keyvanfatehi exactly why I think your suggestion is better, since we have to implement it anyways 👍 Maybe create a new issue for this, not sure if it belongs in |
kk will do |
Nice detective work! On Friday, August 1, 2014, Keyvan Fatehi notifications@github.com wrote:
Niall O'Higgins |
Adding the test repo gives an error code.
The text was updated successfully, but these errors were encountered: