mirror of
https://github.com/desktop/desktop
synced 2024-09-19 08:02:22 +00:00
Better naming for step enum
This commit is contained in:
parent
752510f671
commit
671f9bc6df
|
@ -13,7 +13,7 @@ export interface ICherryPickSnapshot {
|
|||
/** Union type representing the possible states of the cherry pick flow */
|
||||
export type CherryPickFlowStep = ChooseTargetBranchesStep
|
||||
|
||||
export const enum CherryPickStep {
|
||||
export const enum CherryPickStepKind {
|
||||
/**
|
||||
* The initial state of a cherry pick.
|
||||
*
|
||||
|
@ -26,7 +26,7 @@ export const enum CherryPickStep {
|
|||
|
||||
/** Shape of data needed to choose the base branch for a cherry pick */
|
||||
export type ChooseTargetBranchesStep = {
|
||||
readonly kind: CherryPickStep.ChooseTargetBranch
|
||||
readonly kind: CherryPickStepKind.ChooseTargetBranch
|
||||
readonly defaultBranch: Branch | null
|
||||
readonly currentBranch: Branch
|
||||
readonly allBranches: ReadonlyArray<Branch>
|
||||
|
|
|
@ -122,7 +122,10 @@ import { LocalChangesOverwrittenDialog } from './local-changes-overwritten/local
|
|||
import memoizeOne from 'memoize-one'
|
||||
import { AheadBehindStore } from '../lib/stores/ahead-behind-store'
|
||||
import { CherryPickFlow } from './cherry-pick/cherry-pick-flow'
|
||||
import { CherryPickStep, ChooseTargetBranchesStep } from '../models/cherry-pick'
|
||||
import {
|
||||
CherryPickStepKind,
|
||||
ChooseTargetBranchesStep,
|
||||
} from '../models/cherry-pick'
|
||||
import { getAccountForRepository } from '../lib/get-account-for-repository'
|
||||
|
||||
const MinuteInMilliseconds = 1000 * 60
|
||||
|
@ -2737,7 +2740,7 @@ export class App extends React.Component<IAppProps, IAppState> {
|
|||
}
|
||||
|
||||
const initialStep: ChooseTargetBranchesStep = {
|
||||
kind: CherryPickStep.ChooseTargetBranch,
|
||||
kind: CherryPickStepKind.ChooseTargetBranch,
|
||||
defaultBranch,
|
||||
currentBranch,
|
||||
allBranches,
|
||||
|
|
|
@ -2,7 +2,10 @@ import * as React from 'react'
|
|||
|
||||
import { assertNever } from '../../lib/fatal-error'
|
||||
import { Branch } from '../../models/branch'
|
||||
import { CherryPickFlowStep, CherryPickStep } from '../../models/cherry-pick'
|
||||
import {
|
||||
CherryPickFlowStep,
|
||||
CherryPickStepKind,
|
||||
} from '../../models/cherry-pick'
|
||||
|
||||
import { Repository } from '../../models/repository'
|
||||
import { Dispatcher } from '../dispatcher'
|
||||
|
@ -31,7 +34,7 @@ export class CherryPickFlow extends React.Component<ICherryPickFlowProps> {
|
|||
const { step } = this.props
|
||||
|
||||
switch (step.kind) {
|
||||
case CherryPickStep.ChooseTargetBranch: {
|
||||
case CherryPickStepKind.ChooseTargetBranch: {
|
||||
const {
|
||||
allBranches,
|
||||
defaultBranch,
|
||||
|
|
Loading…
Reference in a new issue