Skip to content

Commit 0218ca7

Browse files
committed
Github archive shutdown
1 parent 191f50b commit 0218ca7

23 files changed

+1313
-258
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<template>
2+
<div>
3+
<div class="flex items-center gap-4">
4+
<!-- <lf-button type="secondary-ghost" class="!text-gray-500" @click="isDetailsModalOpen = true">-->
5+
<!-- <lf-icon name="circle-info" type="regular" />-->
6+
<!-- Details-->
7+
<!-- </lf-button>-->
8+
<el-tooltip
9+
content="Onboarding new data for GitHub is currently disabled due to some issues we are experiencing.
10+
Please contact support if you need to onboard new data or update settings."
11+
placement="top"
12+
>
13+
<span>
14+
<lf-button type="secondary" disabled @click="isConnectModalOpen = true">
15+
<lf-icon name="link-simple" />
16+
Connect
17+
</lf-button>
18+
</span>
19+
</el-tooltip>
20+
</div>
21+
<lf-github-connect-modal
22+
v-if="isConnectModalOpen"
23+
v-model="isConnectModalOpen"
24+
/>
25+
<!-- <lf-github-details-modal-->
26+
<!-- v-if="isDetailsModalOpen"-->
27+
<!-- v-model="isDetailsModalOpen"-->
28+
<!-- @connect="isConnectModalOpen = true; isDetailsModalOpen = false;"-->
29+
<!-- />-->
30+
<lf-github-connect-finishing-modal v-model="isFinishingModalOpen" />
31+
</div>
32+
</template>
33+
34+
<script setup lang="ts">
35+
import { onMounted, ref } from 'vue';
36+
import LfButton from '@/ui-kit/button/Button.vue';
37+
import LfIcon from '@/ui-kit/icon/Icon.vue';
38+
import { useRoute } from 'vue-router';
39+
import { mapActions } from '@/shared/vuex/vuex.helpers';
40+
41+
const route = useRoute();
42+
const { doGithubConnect } = mapActions('integration');
43+
44+
const isConnectModalOpen = ref(false);
45+
// const isDetailsModalOpen = ref(false);
46+
const isFinishingModalOpen = ref(false);
47+
48+
const finallizeGithubConnect = () => {
49+
const {
50+
code, source, state,
51+
} = route.query;
52+
const setupAction = route.query.setup_action;
53+
const installId = route.query.installation_id;
54+
55+
if (code && !source && state !== 'noconnect') {
56+
isFinishingModalOpen.value = true;
57+
doGithubConnect({
58+
code,
59+
installId,
60+
setupAction,
61+
}).then(() => {
62+
isFinishingModalOpen.value = false;
63+
});
64+
}
65+
};
66+
67+
onMounted(() => {
68+
finallizeGithubConnect();
69+
});
70+
</script>
71+
72+
<script lang="ts">
73+
export default {
74+
name: 'LfGithubConnect',
75+
};
76+
</script>

frontend/src/config/integrations/github/components/github-connect.vue renamed to frontend/src/config/integrations/github-archive/components/github-connect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import { ref, computed } from 'vue';
3232
import LfButton from '@/ui-kit/button/Button.vue';
3333
import LfIcon from '@/ui-kit/icon/Icon.vue';
34-
import LfGithubSettingsDrawer from '@/config/integrations/github/components/settings/github-settings-drawer.vue';
34+
import LfGithubSettingsDrawer from '@/config/integrations/github-archive/components/settings/github-settings-drawer.vue';
3535
import { isTeamUser } from '@/config/permissions';
3636
import { useAuthStore } from '@/modules/auth/store/auth.store';
3737
import { storeToRefs } from 'pinia';
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<template>
2+
<lf-modal v-model="isModalOpen" width="37.5rem">
3+
<div class="px-6 pt-5 pb-6">
4+
<!-- Header -->
5+
<div class="flex justify-between pb-8">
6+
<div class="pt-1 flex items-center gap-2">
7+
<div class="border border-gray-200 rounded-md h-12 w-12 p-2">
8+
<img src="/images/integrations/github.png" alt="GitHub" class="w-8 h-8 object-contain" />
9+
</div>
10+
<div>
11+
<lf-icon name="angle-right" :size="20" class="text-gray-500" />
12+
</div>
13+
<div class="border border-gray-200 rounded-md h-12 w-12 p-2">
14+
<img src="/images/integrations/custom/lfx.png" alt="LFX" class="w-8 h-8 object-contain" />
15+
</div>
16+
</div>
17+
<lf-button type="secondary-ghost" icon-only @click="isModalOpen = false">
18+
<lf-icon name="xmark" type="regular" />
19+
</lf-button>
20+
</div>
21+
22+
<!-- Content -->
23+
<h5 class="pb-3">
24+
GitHub integration
25+
</h5>
26+
<p class="text-small pb-6">
27+
GitHub is a code hosting platform that over 80 million developers use for
28+
collaboration and version control. Its one of the richest places for
29+
developer activity and information.
30+
</p>
31+
<p class="text-small font-semibold pb-1.5">
32+
Activities tracked
33+
</p>
34+
<p class="text-gray-600 text-small pb-3">
35+
Stars/Un-stars, Forks, Issues, Pull requests, Discussions,
36+
Comments on issues, Pull requests, Discussions, Closing of
37+
issues/pull requests/discussions
38+
</p>
39+
<div class="border-t border-gray-200 pb-3" />
40+
<p class="text-small font-semibold pb-1.5">
41+
Historical import
42+
</p>
43+
<p class="text-gray-600 text-small pb-3">
44+
No limitation
45+
</p>
46+
<div class="border-t border-gray-200 pb-3" />
47+
<p class="text-small font-semibold pb-1.5">
48+
Refresh period
49+
</p>
50+
<p class="text-gray-600 text-small pb-10">
51+
Instant (maximum a few seconds)
52+
</p>
53+
<h6 class="pb-6">
54+
How to connect
55+
</h6>
56+
<div class="flex pb-6">
57+
<div class="w-6 h-6 rounded-full bg-gray-200 font-secondary text-center text-medium flex items-center justify-center">
58+
1
59+
</div>
60+
<div class="pl-2">
61+
<p class="text-small leading-6 font-semibold pb-0.5">
62+
Select the repositories you want to track
63+
</p>
64+
<p class="text-tiny text-gray-500">
65+
Esse et nihil ratione sit facere aut fugiat corporis et animi velit natus laudantium et.
66+
</p>
67+
</div>
68+
</div>
69+
<div class="flex pb-10">
70+
<div class="w-6 h-6 rounded-full bg-gray-200 font-secondary text-center text-medium flex items-center justify-center">
71+
2
72+
</div>
73+
<div class="pl-2">
74+
<p class="text-small leading-6 font-semibold pb-0.5">
75+
Map each repository with the correspondent project
76+
</p>
77+
<p class="text-tiny text-gray-500">
78+
In vero sed libero labore voluptatem eos ut libero consequuntur dolorem aut ut similique.
79+
</p>
80+
</div>
81+
</div>
82+
<lf-button type="secondary" size="large" class="w-full" @click="emit('connect')">
83+
<lf-icon name="link-simple" type="regular" />
84+
Connect GitHub
85+
</lf-button>
86+
</div>
87+
</lf-modal>
88+
</template>
89+
90+
<script setup lang="ts">
91+
import LfModal from '@/ui-kit/modal/Modal.vue';
92+
import { computed } from 'vue';
93+
import LfButton from '@/ui-kit/button/Button.vue';
94+
import LfIcon from '@/ui-kit/icon/Icon.vue';
95+
96+
const props = defineProps<{
97+
modelValue: boolean,
98+
}>();
99+
100+
const emit = defineEmits<{(e: 'update:modelValue', value: boolean): void, (e: 'connect'): void }>();
101+
102+
const isModalOpen = computed({
103+
get: () => props.modelValue,
104+
set: (value: boolean) => emit('update:modelValue', value),
105+
});
106+
</script>
107+
108+
<script lang="ts">
109+
export default {
110+
name: 'LfGithubDetailsModal',
111+
};
112+
</script>

frontend/src/config/integrations/github/components/github-dropdown.vue renamed to frontend/src/config/integrations/github-archive/components/github-dropdown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import { defineProps, ref } from 'vue';
1717
import LfDropdownItem from '@/ui-kit/dropdown/DropdownItem.vue';
1818
import LfIcon from '@/ui-kit/icon/Icon.vue';
19-
import LfGithubSettingsDrawer from '@/config/integrations/github/components/settings/github-settings-drawer.vue';
19+
import LfGithubSettingsDrawer from '@/config/integrations/github-archive/components/settings/github-settings-drawer.vue';
2020
2121
const props = defineProps<{
2222
integration: any,
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<template>
2+
<div class="flex items-center gap-1">
3+
<el-popover trigger="hover" placement="top" popper-class="!w-auto">
4+
<template #reference>
5+
<div
6+
class="text-gray-600 text-2xs flex items-center leading-5"
7+
>
8+
<i
9+
class="ri-git-repository-line text-base !text-gray-600 mr-1 h-4 flex items-center"
10+
/>
11+
12+
<span class="font-semibold">
13+
{{ pluralize("repository", Object.keys(mappings).length, true) }}
14+
</span>
15+
</div>
16+
</template>
17+
18+
<p class="text-gray-400 text-sm font-semibold mb-4">
19+
GitHub repositories
20+
</p>
21+
<div class="-my-1 px-1 max-h-44 overflow-auto">
22+
<article
23+
v-for="mapping of mappings"
24+
:key="mapping.url"
25+
class="py-2 flex items-center flex-nowrap"
26+
>
27+
<i
28+
class="ri-git-repository-line text-base mr-2 h-4 flex items-center"
29+
/>
30+
<a
31+
:href="mapping.url"
32+
target="_blank"
33+
rel="noopener noreferrer"
34+
class="text-xs leading-5 max-w-3xs truncate hover:underline !text-black"
35+
>
36+
/{{ repoNameFromUrl(mapping.url) }}
37+
</a>
38+
<div
39+
class="ri-arrow-right-line text-gray-400 text-base mx-2 h-4 flex items-center"
40+
/>
41+
<div class="text-xs leading-5 max-w-3xs truncate">
42+
{{ mapping.segment.name }}
43+
</div>
44+
</article>
45+
</div>
46+
</el-popover>
47+
</div>
48+
</template>
49+
50+
<script setup lang="ts">
51+
import { onMounted, ref } from 'vue';
52+
import { IntegrationService } from '@/modules/integration/integration-service';
53+
import pluralize from 'pluralize';
54+
55+
const props = defineProps<{
56+
integration: any;
57+
}>();
58+
59+
const mappings = ref([]);
60+
61+
const repoNameFromUrl = (url) => url.split('/').at(-1);
62+
63+
onMounted(() => {
64+
if (props.integration.status !== 'mapping') {
65+
IntegrationService.fetchGitHubMappings(props.integration).then((res) => {
66+
mappings.value = res;
67+
});
68+
}
69+
});
70+
</script>
71+
72+
<script lang="ts">
73+
export default {
74+
name: 'LfGithubStatus',
75+
};
76+
</script>

frontend/src/config/integrations/github/components/settings/github-settings-add-repository-modal.vue renamed to frontend/src/config/integrations/github-archive/components/settings/github-settings-add-repository-modal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ import {
160160
GitHubOrganization,
161161
GitHubRepository,
162162
GitHubSettingsRepository,
163-
} from '@/config/integrations/github/types/GithubSettings';
164-
import { GithubApiService } from '@/config/integrations/github/services/github.api.service';
163+
} from '@/config/integrations/github-archive/types/GithubSettings';
164+
import { GithubApiService } from '@/config/integrations/github-archive/services/github.api.service';
165165
import Message from '@/shared/message/message';
166166
import dayjs from 'dayjs';
167167

0 commit comments

Comments
 (0)