import { GitRepository } from '../../kubernetes/gitRepository' ; import { KubernetesObjectKinds } from '../../kubernetes/kubernetesTypes' ; import { NodeContext } from './nodeContext' ; import { SourceNode } from './sourceNode' ; /**
 * Defines GitRepository tree view item for display in GitOps Sources tree view.
 */ export class GitRepositoryNode extends SourceNode { /**
     * Git repository kubernetes resource object
     */ resource : GitRepository ; param gitRepository constructor ( gitRepository ) { super ( `${ KubernetesObjectKinds . GitRepository }: ${ gitRepository . metadata ?. name }` , gitRepository ) ; this . resource = gitRepository ; } get contexts ( ) { const contextsArr = [ KubernetesObjectKinds . GitRepository ] ; contextsArr . push ( this . resource . spec . suspend ? NodeContext . Suspend : NodeContext . NotSuspend ) ; return contextsArr ; } }