Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/jira_connect_helper.rb')
-rw-r--r--app/helpers/jira_connect_helper.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/helpers/jira_connect_helper.rb b/app/helpers/jira_connect_helper.rb
index 76a7f785df6..475469a6df9 100644
--- a/app/helpers/jira_connect_helper.rb
+++ b/app/helpers/jira_connect_helper.rb
@@ -6,8 +6,24 @@ module JiraConnectHelper
{
groups_path: api_v4_groups_path(params: { min_access_level: Gitlab::Access::MAINTAINER, skip_groups: skip_groups }),
+ subscriptions: subscriptions.map { |s| serialize_subscription(s) }.to_json,
subscriptions_path: jira_connect_subscriptions_path,
users_path: current_user ? nil : jira_connect_users_path
}
end
+
+ private
+
+ def serialize_subscription(subscription)
+ {
+ group: {
+ name: subscription.namespace.name,
+ avatar_url: subscription.namespace.avatar_url,
+ full_name: subscription.namespace.full_name,
+ description: subscription.namespace.description
+ },
+ created_at: subscription.created_at,
+ unlink_path: jira_connect_subscription_path(subscription)
+ }
+ end
end