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

utils.js « error_tracking_settings « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9a09702a0304957a4bfcd915ba181fa89771b1db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export const projectKeys = ['name', 'organizationName', 'organizationSlug', 'slug'];

export const transformFrontendSettings = ({ apiHost, enabled, token, selectedProject }) => {
  const project = selectedProject
    ? {
        slug: selectedProject.slug,
        name: selectedProject.name,
        organization_name: selectedProject.organizationName,
        organization_slug: selectedProject.organizationSlug,
      }
    : null;

  return { api_host: apiHost || null, enabled, token: token || null, project };
};

export const getDisplayName = project => `${project.organizationName} | ${project.slug}`;