diff --git a/web/src/components/repo/RepoItems.vue b/web/src/components/repo/RepoItems.vue index 81d8ee23f..fa0ce4a65 100644 --- a/web/src/components/repo/RepoItems.vue +++ b/web/src/components/repo/RepoItems.vue @@ -3,36 +3,51 @@
-
- - - {{ `${repo.owner} / ${repo.name}` }} - +
+
{{ `${repo.owner} / ${repo.name}` }}
+
- +
-
-
- - - - - - - - - +
+
+ + {{ shortMessage }} -
-
+
{{ $t('repo.pipeline.no_pipelines') }}
+ +
+
+
+ + + + + + + + + + {{ prettyRef }} +
+ +
+ + {{ since }} +
+
+
@@ -54,8 +69,8 @@ const props = defineProps<{ }>(); const repo = props.repo; -const pipeline = toRef(repo.last_pipeline); -const { since, shortMessage } = usePipeline(pipeline); +const pipeline = toRef(repo.last_pipeline_item); +const { since, shortMessage, prettyRef } = usePipeline(pipeline); const { t } = useI18n(); diff --git a/web/src/compositions/useRepos.ts b/web/src/compositions/useRepos.ts index 4f3d505f8..ac754727a 100644 --- a/web/src/compositions/useRepos.ts +++ b/web/src/compositions/useRepos.ts @@ -16,8 +16,8 @@ export default function useRepos() { function sortReposByLastActivity(repos: Repo[]): Repo[] { return repos.sort((a, b) => { - const aLastActivity = a.last_pipeline?.created || 0; - const bLastActivity = b.last_pipeline?.created || 0; + const aLastActivity = a.last_pipeline_item?.created || 0; + const bLastActivity = b.last_pipeline_item?.created || 0; return bLastActivity - aLastActivity; }); diff --git a/web/src/lib/api/types/repo.ts b/web/src/lib/api/types/repo.ts index 20e1ba641..cfb323b2b 100644 --- a/web/src/lib/api/types/repo.ts +++ b/web/src/lib/api/types/repo.ts @@ -67,7 +67,9 @@ export interface Repo { visibility: RepoVisibility; - last_pipeline: Pipeline; + last_pipeline: number; + + last_pipeline_item: Pipeline; require_approval: RepoRequireApproval; diff --git a/web/src/store/repos.ts b/web/src/store/repos.ts index 467a9105d..f14d9a5b8 100644 --- a/web/src/store/repos.ts +++ b/web/src/store/repos.ts @@ -35,7 +35,7 @@ export const useRepoStore = defineStore('repos', () => { await Promise.all( _ownedRepos.map(async (repo) => { const latestPipeline = await apiClient.getPipelineList(repo.id, { page: 1, perPage: 1 }); - repo.last_pipeline = latestPipeline[0]; + repo.last_pipeline_item = latestPipeline[0]; repos.set(repo.id, repo); }), );