diff --git a/app/controllers/concerns/issues_action.rb b/app/controllers/concerns/issues_action.rb
new file mode 100644
index 0000000000000000000000000000000000000000..effd47219496a56036661fdfc8d869a9b4e87ec9
--- /dev/null
+++ b/app/controllers/concerns/issues_action.rb
@@ -0,0 +1,14 @@
+module IssuesAction
+  extend ActiveSupport::Concern
+
+  def issues
+    @issues = get_issues_collection
+    @issues = @issues.page(params[:page]).per(ApplicationController::PER_PAGE)
+    @issues = @issues.preload(:author, :project)
+
+    respond_to do |format|
+      format.html
+      format.atom { render layout: false }
+    end
+  end
+end
diff --git a/app/controllers/concerns/merge_requests_action.rb b/app/controllers/concerns/merge_requests_action.rb
new file mode 100644
index 0000000000000000000000000000000000000000..f7a25111db96d49c4d045cb1ed57a8c55a0fe2c1
--- /dev/null
+++ b/app/controllers/concerns/merge_requests_action.rb
@@ -0,0 +1,9 @@
+module MergeRequestsAction
+  extend ActiveSupport::Concern
+
+  def merge_requests
+    @merge_requests = get_merge_requests_collection
+    @merge_requests = @merge_requests.page(params[:page]).per(ApplicationController::PER_PAGE)
+    @merge_requests = @merge_requests.preload(:author, :target_project)
+  end
+end
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index b2c1fa4230c9f01ce09e94098e8e5567d55dfdf4..087da935087149bbf6d76bb39ca136388c4f3765 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -1,26 +1,12 @@
 class DashboardController < Dashboard::ApplicationController
+  include IssuesAction
+  include MergeRequestsAction
+
   before_action :event_filter, only: :activity
   before_action :projects, only: [:issues, :merge_requests]
 
   respond_to :html
 
-  def merge_requests
-    @merge_requests = get_merge_requests_collection
-    @merge_requests = @merge_requests.page(params[:page]).per(PER_PAGE)
-    @merge_requests = @merge_requests.preload(:author, :target_project)
-  end
-
-  def issues
-    @issues = get_issues_collection
-    @issues = @issues.page(params[:page]).per(PER_PAGE)
-    @issues = @issues.preload(:author, :project)
-
-    respond_to do |format|
-      format.html
-      format.atom { render layout: false }
-    end
-  end
-
   def activity
     @last_push = current_user.recent_push
 
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index fb4eb094f274627c6e5c7a30348787f5d86d109f..fb26a4e6fc335a3780394b5d8388ee32268999e6 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -1,4 +1,7 @@
 class GroupsController < Groups::ApplicationController
+  include IssuesAction
+  include MergeRequestsAction
+
   skip_before_action :authenticate_user!, only: [:show, :issues, :merge_requests]
   respond_to :html
   before_action :group, except: [:new, :create]
@@ -53,23 +56,6 @@ class GroupsController < Groups::ApplicationController
     end
   end
 
-  def merge_requests
-    @merge_requests = get_merge_requests_collection
-    @merge_requests = @merge_requests.page(params[:page]).per(PER_PAGE)
-    @merge_requests = @merge_requests.preload(:author, :target_project)
-  end
-
-  def issues
-    @issues = get_issues_collection
-    @issues = @issues.page(params[:page]).per(PER_PAGE)
-    @issues = @issues.preload(:author, :project)
-
-    respond_to do |format|
-      format.html
-      format.atom { render layout: false }
-    end
-  end
-
   def edit
   end
 
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb
index a0f6b80e9eb7f4a3108d82304f3a443e01c00448..98c6d9d5d2ece0660c58b92194537cda308a1d74 100644
--- a/app/helpers/gitlab_markdown_helper.rb
+++ b/app/helpers/gitlab_markdown_helper.rb
@@ -46,7 +46,7 @@ module GitlabMarkdownHelper
   end
 
   def markdown(text, context = {})
-    process_markdown(text, options)
+    process_markdown(text, context)
   end
 
   # TODO (rspeicher): Remove all usages of this helper and just call `markdown`
diff --git a/app/models/project_services/slack_service/note_message.rb b/app/models/project_services/slack_service/note_message.rb
index 074478b292da5ef73cd6cd7860bf0893404d1cfa..b15d9a1467771833aa698e02496ca91398a39fd5 100644
--- a/app/models/project_services/slack_service/note_message.rb
+++ b/app/models/project_services/slack_service/note_message.rb
@@ -45,30 +45,27 @@ class SlackService
     def create_commit_note(commit)
       commit_sha = commit[:id]
       commit_sha = Commit.truncate_sha(commit_sha)
-      commit_link = "[commit #{commit_sha}](#{@note_url})"
-      title = format_title(commit[:message])
-      @message = "#{@user_name} commented on #{commit_link} in #{project_link}: *#{title}*"
+      commented_on_message(
+        "[commit #{commit_sha}](#{@note_url})",
+        format_title(commit[:message]))
     end
 
     def create_issue_note(issue)
-      issue_iid = issue[:iid]
-      note_link = "[issue ##{issue_iid}](#{@note_url})"
-      title = format_title(issue[:title])
-      @message = "#{@user_name} commented on #{note_link} in #{project_link}: *#{title}*"
+      commented_on_message(
+        "[issue ##{issue[:iid]}](#{@note_url})",
+        format_title(issue[:title]))
     end
 
     def create_merge_note(merge_request)
-      merge_request_id = merge_request[:iid]
-      merge_request_link = "[merge request ##{merge_request_id}](#{@note_url})"
-      title = format_title(merge_request[:title])
-      @message = "#{@user_name} commented on #{merge_request_link} in #{project_link}: *#{title}*"
+      commented_on_message(
+        "[merge request ##{merge_request[:iid]}](#{@note_url})",
+        format_title(merge_request[:title]))
     end
 
     def create_snippet_note(snippet)
-      snippet_id = snippet[:id]
-      snippet_link = "[snippet ##{snippet_id}](#{@note_url})"
-      title = format_title(snippet[:title])
-      @message = "#{@user_name} commented on #{snippet_link} in #{project_link}: *#{title}*"
+      commented_on_message(
+        "[snippet ##{snippet[:id]}](#{@note_url})",
+        format_title(snippet[:title]))
     end
 
     def description_message
@@ -78,5 +75,9 @@ class SlackService
     def project_link
       "[#{@project_name}](#{@project_url})"
     end
+
+    def commented_on_message(target_link, title)
+      @message = "#{@user_name} commented on #{target_link} in #{project_link}: *#{title}*"
+    end
   end
 end