File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
+ const config = useRuntimeConfig ()
3
+
2
4
const { data : allowedRepos, refresh } = useFetch (' /api/repos' , {
3
- baseURL: useRuntimeConfig () .public .remote ,
5
+ baseURL: config .public .remote ,
4
6
default : () => [],
5
7
})
6
8
9
+ const installationURL = ` https://github.com/apps/${config .public .github .appSlug }/installations/new `
10
+
7
11
const route = useRoute ()
8
12
const isCallback = ref (!! route .query .installation_id )
9
13
const numRepos = allowedRepos .value ?.length
@@ -31,7 +35,7 @@ const repos = computed(() => allowedRepos.value.filter(r => r.issuesIndexed > 10
31
35
</p >
32
36
<NuxtLink
33
37
class =" bg-green-700 rounded-md px-5 py-3 font-medium flex flex-row gap-2 items-center color-white no-underline focus:bg-green-800 hover:bg-green-800 transition-colors shadow-lg"
34
- :href =" isCallback ? '' : 'https://github.com/apps/unsight-dev/installations/new' "
38
+ :href =" isCallback ? '' : installationURL "
35
39
:class =" { 'pointer-events-none opacity-50': isCallback }"
36
40
>
37
41
<template v-if =" isCallback " >
Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ export default defineNuxtConfig({
22
22
runtimeConfig : {
23
23
public : {
24
24
remote : '/' ,
25
+ github : {
26
+ appSlug : 'unsight-dev' ,
27
+ } ,
25
28
} ,
26
29
github : {
27
30
appId : '' ,
You can’t perform that action at this time.
0 commit comments