module Gitlab::Client::Projects

def add_push_rule(id, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) - Information about added push rule.

Parameters:
  • option (String) -- :commit_message_regex Commit message regex
  • option (Boolean) -- :deny_delete_tag Do not allow users to remove git tags with git push (0 = false, 1 = true)
  • options (Hash) -- A customizable set of options.
  • id (Integer) -- The ID of a project.

Other tags:
    See: https://docs.gitlab.com/ee/api/projects.html#add-project-push-rule -
def add_push_rule(id, options = {})
  post("/projects/#{url_encode id}/push_rule", body: options)
end