mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add packagist webhook (#18224)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
committed by
GitHub
parent
87141b908d
commit
3349fd8f79
@@ -34,6 +34,9 @@
|
||||
<a class="item" href="{{.BaseLinkNew}}/wechatwork/new">
|
||||
<img width="20" height="20" src="{{AssetUrlPrefix}}/img/wechatwork.png">Wechatwork
|
||||
</a>
|
||||
<a class="item" href="{{.BaseLinkNew}}/packagist/new">
|
||||
<img width="20" height="20" src="{{AssetUrlPrefix}}/img/packagist.png">Packagist
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -27,6 +27,8 @@
|
||||
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/matrix.svg">
|
||||
{{else if eq .HookType "wechatwork"}}
|
||||
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/wechatwork.png">
|
||||
{{else if eq .HookType "packagist"}}
|
||||
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/packagist.png">
|
||||
{{end}}
|
||||
</div>
|
||||
</h4>
|
||||
@@ -41,6 +43,7 @@
|
||||
{{template "repo/settings/webhook/feishu" .}}
|
||||
{{template "repo/settings/webhook/matrix" .}}
|
||||
{{template "repo/settings/webhook/wechatwork" .}}
|
||||
{{template "repo/settings/webhook/packagist" .}}
|
||||
</div>
|
||||
|
||||
{{template "repo/settings/webhook/history" .}}
|
||||
|
19
templates/repo/settings/webhook/packagist.tmpl
Normal file
19
templates/repo/settings/webhook/packagist.tmpl
Normal file
@@ -0,0 +1,19 @@
|
||||
{{if eq .HookType "packagist"}}
|
||||
<p>{{.i18n.Tr "repo.settings.add_packagist_hook_desc" "https://packagist.org" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/packagist/{{or .Webhook.ID "new"}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_Username}}error{{end}}">
|
||||
<label for="username">{{.i18n.Tr "repo.settings.packagist_username"}}</label>
|
||||
<input id="username" name="username" value="{{.PackagistHook.Username}}" placeholder="e.g. Gitea" autofocus required>
|
||||
</div>
|
||||
<div class="required field {{if .Err_APIToken}}error{{end}}">
|
||||
<label for="api_token">{{.i18n.Tr "repo.settings.packagist_api_token"}}</label>
|
||||
<input id="api_token" name="api_token" value="{{.PackagistHook.APIToken}}" placeholder="e.g. X5F_tZ-Wj3c1vqaU2Rky" required>
|
||||
</div>
|
||||
<div class="required field {{if .Err_PackageURL}}error{{end}}">
|
||||
<label for="package_url">{{.i18n.Tr "repo.settings.packagist_package_url"}}</label>
|
||||
<input id="package_url" name="package_url" value="{{.PackagistHook.PackageURL}}" placeholder="e.g. https://packagist.org/packages/laravel/framework" required>
|
||||
</div>
|
||||
{{template "repo/settings/webhook/settings" .}}
|
||||
</form>
|
||||
{{end}}
|
Reference in New Issue
Block a user