Skip to content

Added delete support to the Github/Api/Repo - #10

Merged
stloyd merged 1 commit into
KnpLabs:masterfrom
githalytics:master
Aug 19, 2012
Merged

stloyd merged 1 commit into
KnpLabs:masterfrom
githalytics:master

Conversation

@dmtrs

@dmtrs dmtrs commented Aug 7, 2012

Copy link
Copy Markdown
Contributor

First of all, I was a little bit confused that although in the docs the Repo::delete('user','repo) was mentioned I could not find it in the object.
Secondly, response is null or I am doing something wrong.

@stloyd

stloyd commented Aug 8, 2012

Copy link
Copy Markdown
Contributor

Thanks, but to be consistent with other changes this method should be renamed to: remove. Also if you update docs to according change I will merge it ASAP.

ps. It's null because GH doesn't return any content in response (only headers with statuses, in this case 204 if successful), but I'm working on way how to handle this nicely.

@dmtrs

dmtrs commented Aug 8, 2012

Copy link
Copy Markdown
Contributor Author

Will correct later on today.

@dmtrs

dmtrs commented Aug 8, 2012

Copy link
Copy Markdown
Contributor Author

You mean not implement the function remove at all and use the AbstractApi delete ? Cheked that but the "problem" is the conistency as delete need the full repo url as param, where in other funcions in repo you have to set username and repo name in 2 diff params

@stloyd

stloyd commented Aug 8, 2012

Copy link
Copy Markdown
Contributor

@dmtrs You should rename this function you have added from: delete to remove, because delete function have different behavior, it's about calling DELETE method.

And mocking is for "hiding" (not calling real API) real calls behind mock. Please look how it's implemented already in tests.

stloyd added a commit that referenced this pull request Aug 19, 2012
Added delete support to the Github/Api/Repo
@stloyd
stloyd merged commit 3867a94 into KnpLabs:master Aug 19, 2012
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.

3 participants