Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clickable repo link in feed #2001

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion web/src/components/pipeline-feed/PipelineFeedItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
<div v-if="pipeline" class="flex text-color w-full">
<PipelineStatusIcon :status="pipeline.status" class="flex items-center" />
<div class="flex flex-col ml-4 min-w-0">
<span class="underline">{{ repo?.owner }} / {{ repo?.name }}</span>
<a
:href="`${config.rootURL ?? ''}{{ repo?.owner }}/{{ repo?.name }}`"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use link to repoview directly (it use reoID directly)

target="_blank"
class="text-blue-700 dark:text-link flex items-center"
>{{ repo?.owner }} / {{ repo?.name }}
</a>
<span class="whitespace-nowrap overflow-hidden overflow-ellipsis">{{ message }}</span>
<div class="flex flex-col mt-2">
<div class="flex space-x-2 items-center">
Expand All @@ -29,6 +34,7 @@ import { computed, toRef } from 'vue';

import Icon from '~/components/atomic/Icon.vue';
import PipelineStatusIcon from '~/components/repo/pipeline/PipelineStatusIcon.vue';
import useConfig from '~/compositions/useConfig';
import usePipeline from '~/compositions/usePipeline';
import { PipelineFeed } from '~/lib/api/types';
import { useRepoStore } from '~/store/repos';
Expand All @@ -42,5 +48,7 @@ const repoStore = useRepoStore();
const pipeline = toRef(props, 'pipeline');
const repo = repoStore.getRepo(computed(() => pipeline.value.repo_id));

const config = useConfig();

const { since, duration, message, created } = usePipeline(pipeline);
</script>