diff --git a/src/components/commit-actions/commit-actions.tsx b/src/components/commit-actions/commit-actions.tsx index 990c7ed..4ce0b3b 100644 --- a/src/components/commit-actions/commit-actions.tsx +++ b/src/components/commit-actions/commit-actions.tsx @@ -4,7 +4,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { makeAutoObservable } from 'mobx'; import { ActionButton } from './action-button'; import { gql, useMutation } from '@apollo/client'; -import { Project } from '../../generated/graphql'; +import { Project, Pipeline } from '../../generated/graphql'; import { CommitActionsStoreProvider, CommitActionsStore @@ -20,7 +20,7 @@ import { useLocalObservable } from 'mobx-react'; const CHECKOUT = ''; interface Props { - project: Project; + pipeline: Pipeline; commitNumber: string; branch?: string; } @@ -32,7 +32,7 @@ class Store { isTasksWorking = [false, false, false, false]; } -export const CommitActions = ({ project, commitNumber }: Props) => { +export const CommitActions = ({ pipeline, commitNumber }: Props) => { const [checkout] = useMutation(CHECKOUT); const onCheckoutBtnClick = async () => { diff --git a/src/routes/pipelines/pipeline-editor.tsx b/src/routes/pipelines/pipeline-editor.tsx index 95e19a5..ec98ab1 100644 --- a/src/routes/pipelines/pipeline-editor.tsx +++ b/src/routes/pipelines/pipeline-editor.tsx @@ -119,7 +119,10 @@ export const PipelineEditor = ({ projectId, id }: Props) => { delete fd.__typename; return fd; } - return {}; + return { + projectId, + workUnitMetadata: JSON.stringify(defaultWorkUnitMetadata, null, 2) + }; }, [data, data?.pipeline]); const [createPipeline] = useMutation<{ pipeline: Pipeline }>(