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

getters.js « store « settings « registry « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cd6392bd0cc83a4ac7920c334e6e205102d2c14f (plain)
1
2
3
4
5
6
7
8
9
10
import { isEqual } from 'lodash';
import { findDefaultOption } from '../utils';

export const getCadence = state =>
  state.settings.cadence || findDefaultOption(state.formOptions.cadence);
export const getKeepN = state =>
  state.settings.keep_n || findDefaultOption(state.formOptions.keepN);
export const getOlderThan = state =>
  state.settings.older_than || findDefaultOption(state.formOptions.olderThan);
export const getIsEdited = state => !isEqual(state.original, state.settings);