feat(commits): commit and task list.

This commit is contained in:
Ivan Li
2021-05-09 15:29:11 +08:00
parent 5d3f97667a
commit dbb81fa952
16 changed files with 784 additions and 32 deletions

3
src/pipelines/index.ts Normal file
View File

@@ -0,0 +1,3 @@
export * from './pipeline-detail';
export * from './pipeline-list';
export * from './queries';

View File

@@ -0,0 +1,11 @@
import { FC } from 'react';
import { Pipeline } from '../generated/graphql';
interface Props {
pipeline: Pipeline;
}
export const PipelineDetail: FC<Props> = ({pipeline}) => {
return <div>PipelineDetail</div>
}

View File

@@ -27,8 +27,8 @@ export const PipelineList: FC<Props> = ({ projectId }) => {
<List>
{data?.pipelines.map((pipeline) => (
<Link
name="pipeline-details"
params={{ pipelineId: pipeline.id }}
name="pipeline-commits"
params={{ pipelineId: pipeline.id, projectId: projectId }}
key={pipeline.id}
>
<Item pipeline={pipeline} />

18
src/pipelines/queries.ts Normal file
View File

@@ -0,0 +1,18 @@
import { gql } from '@apollo/client';
export const PIPELINE = gql`
query Pipeline($id: String!) {
pipeline(id: $id) {
id
name
branch
workUnitMetadata {
version
units {
type
scripts
}
}
}
}
`