Skip to content

added remove method for Issues #149

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

Merged
merged 1 commit into from Oct 3, 2016
Merged

added remove method for Issues #149

merged 1 commit into from Oct 3, 2016

Conversation

ghost
Copy link

@ghost ghost commented Oct 3, 2016

No description provided.

@@ -58,6 +58,16 @@ public function update($project_id, $issue_id, array $params)
* @param int $issue_id
* @return mixed
*/
public function remove($project_id, $issue_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

@brammeleman let's pls use delete on the method name, to keep the API's naming: https://docs.gitlab.com/ce/api/issues.html#delete-an-issue.

Copy link
Author

Choose a reason for hiding this comment

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

Mmmh... I'm confused: the gitlab API just tells to do a http delete on an issue id, which is like any other object in gitlab.

Copy link
Author

Choose a reason for hiding this comment

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

All other objects use remove:

~/src/php-gitlab-api/lib/Gitlab/Api $ grep function * | egrep 'remove|delete'
AbstractApi.php:    protected function delete($path, array $parameters = array(), $requestHeaders = array())
Groups.php:    public function remove($group_id)
Groups.php:    public function removeMember($group_id, $user_id)
Issues.php:    public function remove($project_id, $issue_id)
Projects.php:    public function remove($project_id)
Projects.php:    public function removeMember($project_id, $user_id)
Projects.php:    public function removeHook($project_id, $hook_id)
Projects.php:    public function removeKey($project_id, $key_id)
Projects.php:    public function removeLabel($project_id, $name)
Projects.php:    public function removeForkRelation($project_id)
Projects.php:    public function removeService($project_id, $service_name)
Projects.php:    public function removeVariable($project_id, $key)
Repositories.php:    public function deleteBranch($project_id, $branch_name)
Repositories.php:    public function deleteFile($project_id, $file_path, $branch_name, $commit_message)
Snippets.php:    public function remove($project_id, $snippet_id)
SystemHooks.php:    public function remove($id)
Users.php:    public function remove($id)
Users.php:    public function removeKey($id)
Users.php:    public function removeUserKey($user_id, $key_id)

Copy link
Contributor

Choose a reason for hiding this comment

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

Well.. there are 2 there :) .. we should rename the Repositories ones..

@radutopala radutopala merged commit 25c2991 into GitLabPHP:master Oct 3, 2016
quentin-st added a commit to quentin-st/php-gitlab-api that referenced this pull request Oct 3, 2016
radutopala pushed a commit that referenced this pull request Oct 3, 2016
* Add ability to delete an issue comment

* Rename deleteComment to removeComment according to #149
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant