lib/github_api/issues/labels.rb in github_api-0.3.7 vs lib/github_api/issues/labels.rb in github_api-0.3.8

- old
+ new

@@ -169,13 +169,14 @@ # @github = Github.new # @github.issues.replace_labels 'user-name', 'repo-name', 'issue-id', 'label1', 'label2', ... # def replace_labels(user_name, repo_name, issue_id, *args) params = args.last.is_a?(Hash) ? args.pop : {} - params['data'] = [args].flatten unless args.nil? + params['data'] = args unless args.empty? + _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? - _validate_presence_of(issue_id) + _validate_presence_of issue_id _normalize_params_keys(params) put("/repos/#{user}/#{repo}/issues/#{issue_id}/labels", params) end