Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@akashdotsrivastava
Copy link
Collaborator

@akashdotsrivastava akashdotsrivastava commented Jun 30, 2018

Closes #392

# @param [Integer] project(required) The ID of a project.
# @param [Integer] merge_request(required) The IID of a merge_request.
# @return [Gitlab::ObjectifiedHash] MR approval configuration information about the merge request
def merge_request_mr_approvals_configuration(project, merge_request)

Choose a reason for hiding this comment

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

Do we need the prefix to be merge_request_mr? I think merge_request would be sufficient.

Copy link
Collaborator Author

@akashdotsrivastava akashdotsrivastava Jul 2, 2018

Choose a reason for hiding this comment

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

The thought crossed my mind. But since we are maintaining two levels of MR approvals, one at the project level as well as one at the Merge Request Level, this seemed more intuitive to differentiate between the two.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So should I edit it or its OK ?

Choose a reason for hiding this comment

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

I'm not a maintainer ;) I just came about your MR and am using your code myself. Seems this project is not so actively maintained.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

okay @asedge , any chance this gets merged ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

merge_request_approvals would be more consistent with other method naming.

Copy link
Collaborator

@asedge asedge left a comment

Choose a reason for hiding this comment

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

I provided some feedback on how I think the method names could be changed so they more closely match what we've done elsewhere.

#
# @param [Integer] project The ID of a project.
# @return [Gitlab::ObjectifiedHash] MR approval configuration information about the project
def project_mr_approvals_configuration(project)
Copy link
Collaborator

Choose a reason for hiding this comment

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

project_merge_request_approvals would more closely follow the method naming pattern we have elsewhere.

# @option options [Boolean] :reset_approvals_on_push(optional) Reset approvals on a new push
# @option options [Boolean] :disable_overriding_approvers_per_merge_request(optional) Allow/Disallow overriding approvers per MR
# @return [Gitlab::ObjectifiedHash] MR approval configuration information about the project
def change_project_mr_approvals_configuration(project, options = {})
Copy link
Collaborator

Choose a reason for hiding this comment

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

edit_project_merge_request_approvals - we use methods starting with edit when resources are changed, I think we should stay consistent.

# @option options [Array] :approver_ids(optional) An array of User IDs that can approve MRs
# @option options [Array] :approver_group_ids(optional) An array of Group IDs whose members can approve MRs
# @return [Gitlab::ObjectifiedHash] MR approval configuration information about the project
def change_project_approvers(project, options = {})
Copy link
Collaborator

Choose a reason for hiding this comment

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

edit_project_approvers

# @param [Integer] merge_request(required) The IID of a merge_request.
# @option options [Integer] :approvals_required(required) Approvals required before MR can be merged
# @return [Gitlab::ObjectifiedHash] Updated MR approval configuration information about the merge request
def change_merge_request_mr_approvals_configuration(project, merge_request, options = {})
Copy link
Collaborator

Choose a reason for hiding this comment

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

edit_merge_request_approvals

# @option options [Array] :approver_ids(optional) An array of User IDs that can approve MRs
# @option options [Array] :approver_group_ids(optional) An array of Group IDs whose members can approve MRs
# @return [Gitlab::ObjectifiedHash] MR approval configuration information about the project
def change_merge_request_approvers(project, merge_request, options = {})
Copy link
Collaborator

Choose a reason for hiding this comment

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

edit_merge_request_approvers

#
# @param [Integer] project(required) The ID of a project.
# @param [Integer] merge_request(required) The IID of a merge request.
# @option options [String] :sha(required) The HEAD of the MR
Copy link
Collaborator

Choose a reason for hiding this comment

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

# @param [Integer] project(required) The ID of a project.
# @param [Integer] merge_request(required) The IID of a merge_request.
# @return [Gitlab::ObjectifiedHash] MR approval configuration information about the merge request
def merge_request_mr_approvals_configuration(project, merge_request)
Copy link
Collaborator

Choose a reason for hiding this comment

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

merge_request_approvals would be more consistent with other method naming.

@asedge asedge merged commit f4b4be4 into NARKOZ:master Jul 12, 2018
@born4new
Copy link
Contributor

@asedge Would it be possible to release a new gem version with that change?

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.

4 participants