适配gitea 取消gogs(没有对应接口支持)

This commit is contained in:
Hua
2025-04-02 14:28:56 +08:00
parent 7ec5abe67f
commit 8480656ca4
9 changed files with 297 additions and 379 deletions

View File

@ -399,7 +399,7 @@
<select class="form-control" name="git[${index}].type" required
title="请选择 Git 平台类型">
<option value="gitlab" ${platform.type === 'gitlab' ? 'selected' : ''}>GitLab</option>
<option value="gitee" ${platform.type === 'gitee' ? 'selected' : ''}>Gitee</option>
<option value="gitea" ${platform.type === 'gitea' ? 'selected' : ''}>Gitea</option>
</select>
</div>
${createPasswordField(`git[${index}].token`, platform.token, 'Token', '请输入平台访问令牌')}
@ -510,8 +510,8 @@
token: platform.token,
webhook_secret: platform.webhook_secret,
api_base: platform.api_base,
signature_header: platform.type === 'gitlab' ? 'X-Gitlab-Token' : 'X-Gitee-Token',
event_header: platform.type === 'gitlab' ? 'X-Gitlab-Event' : 'X-Gitee-Event'
signature_header: platform.type === 'gitlab' ? 'X-Gitlab-Token' : 'X-Gitea-Signature',
event_header: platform.type === 'gitlab' ? 'X-Gitlab-Event' : 'X-Gitea-Event'
}))
};
}