All files / publisher/release/actions channelMap.js

100% Statements 11/11
100% Branches 0/0
100% Functions 6/6
100% Lines 11/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 528x 8x 8x 8x 8x     2x             40x             3x             18x           6x                   4x              
export const INIT_CHANNEL_MAP = "INIT_CHANNEL_MAP";
export const SELECT_REVISION = "SELECT_REVISION";
export const CLEAR_SELECTED_REVISIONS = "CLEAR_SELECTED_REVISIONS";
export const RELEASE_REVISION_SUCCESS = "RELEASE_REVISION_SUCCESS";
export const CLOSE_CHANNEL_SUCCESS = "CLOSE_CHANNEL_SUCCESS";
 
export function initChannelMap(channelMap) {
  return {
    type: INIT_CHANNEL_MAP,
    payload: { channelMap },
  };
}
 
export function selectRevision(revision) {
  return {
    type: SELECT_REVISION,
    payload: { revision, toggle: false },
  };
}
 
export function toggleRevision(revision) {
  return {
    type: SELECT_REVISION,
    payload: { revision, toggle: true },
  };
}
 
export function clearSelectedRevisions() {
  return {
    type: CLEAR_SELECTED_REVISIONS,
  };
}
 
export function releaseRevisionSuccess(revision, channel) {
  return {
    type: RELEASE_REVISION_SUCCESS,
    payload: {
      revision,
      channel,
    },
  };
}
 
export function closeChannelSuccess(channel) {
  return {
    type: CLOSE_CHANNEL_SUCCESS,
    payload: {
      channel,
    },
  };
}