适配gitea 取消gogs(没有对应接口支持)
This commit is contained in:
@ -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'
|
||||
}))
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user