debian-mirror-gitlab/lib/gitlab/slash_commands/presenters/issue_new.rb

30 lines
625 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
module Gitlab
2017-09-10 17:25:29 +05:30
module SlashCommands
2017-08-17 22:00:37 +05:30
module Presenters
class IssueNew < Presenters::Base
include Presenters::IssueBase
def present
2020-01-01 13:55:28 +05:30
in_channel_response(response_message)
2017-08-17 22:00:37 +05:30
end
private
2020-01-01 13:55:28 +05:30
def fallback_message
"New issue #{issue.to_reference}: #{issue.title}"
end
def fields_with_markdown
%i(title pretext text fields)
2017-08-17 22:00:37 +05:30
end
def pretext
2020-01-01 13:55:28 +05:30
"I created an issue on #{author_profile_link}'s behalf: *#{issue.to_reference}* in #{project_link}"
2017-08-17 22:00:37 +05:30
end
end
end
end
end