debian-mirror-gitlab/spec/support/helpers/service_desk_helper.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
324 B
Ruby
Raw Normal View History

2023-03-04 22:38:38 +05:30
# frozen_string_literal: true
module ServiceDeskHelper
def set_template_file(file_name, content)
file_path = ".gitlab/issue_templates/#{file_name}.md"
project.repository.create_file(user, file_path, content, message: 'message', branch_name: 'master')
settings.update!(issue_template_key: file_name)
end
end