fix: Gitlab webhooks fixed
This commit is contained in:
parent
6c9ef34905
commit
64cd5b6e4b
@ -18,7 +18,7 @@ export const handle = handleSession(
|
||||
try {
|
||||
if (event.locals.cookies) {
|
||||
let gitlabToken = event.locals.cookies.gitlabToken || null;
|
||||
let ghToken = event.locals.cookies.ghToken;
|
||||
let ghToken = event.locals.cookies.ghToken || null;
|
||||
if (event.locals.cookies['kit.session']) {
|
||||
const { permission, teamId, userId } = await getUserDetails(event, false);
|
||||
const newSession = {
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
function generateUrl() {
|
||||
return browser
|
||||
? `${database.type}://${database.type === 'redis' ? ':' : ''}${
|
||||
? `${database.type}://${
|
||||
databaseDbUser ? databaseDbUser + ':' : ''
|
||||
}${databaseDbUserPassword}@${
|
||||
isPublic
|
||||
|
@ -121,12 +121,15 @@
|
||||
|
||||
<Explainer
|
||||
customClass="w-full"
|
||||
text="<span class='font-bold text-base'>Scopes required:</span>
|
||||
<br>- api (Access the authenticated user's API)
|
||||
<br>- read_repository (Allows read-only access to the repository)
|
||||
<br>- email (Allows read-only access to the user's primary email address using OpenID Connect)
|
||||
text="<span class='font-bold text-base text-white'>Scopes required:</span>
|
||||
<br>- <span class='text-orange-500 font-bold'>api</span> (Access the authenticated user's API)
|
||||
<br>- <span class='text-orange-500 font-bold'>read_repository</span> (Allows read-only access to the repository)
|
||||
<br>- <span class='text-orange-500 font-bold'>email</span> (Allows read-only access to the user's primary email address using OpenID Connect)
|
||||
<br>
|
||||
<br>For extra security, you can add Expire access tokens!"
|
||||
<br>For extra security, you can set Expire access tokens!
|
||||
<br><br>Webhook URL: <span class='text-orange-500 font-bold'>{window.location
|
||||
.origin}/webhooks/gitlab</span>
|
||||
<br>But if you will set a custom domain name for Coolify, use that instead."
|
||||
/>
|
||||
</form>
|
||||
<form on:submit|preventDefault={handleSubmit} class="grid grid-flow-row gap-2 py-4 pt-10">
|
||||
|
@ -21,8 +21,8 @@ export const get: RequestHandler = async (event) => {
|
||||
const code = event.url.searchParams.get('code');
|
||||
const state = event.url.searchParams.get('state');
|
||||
try {
|
||||
const { fqdn } = await db.listSettings();
|
||||
const application = await db.getApplication({ id: state, teamId });
|
||||
const { fqdn } = application;
|
||||
const { appId, appSecret } = application.gitSource.gitlabApp;
|
||||
const { htmlUrl } = application.gitSource;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user