mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 08:20:13 +00:00
new create webhook event
This commit is contained in:
parent
a541ca16b6
commit
f509c59ac1
16 changed files with 449 additions and 306 deletions
|
@ -83,7 +83,7 @@ func CreateRepoHook(ctx *middleware.Context, form api.CreateHookOption) {
|
|||
ctx.JSON(422, &base.ApiJsonErr{"missing config option: channel", base.DOC_URL})
|
||||
return
|
||||
}
|
||||
meta, err := json.Marshal(&models.Slack{
|
||||
meta, err := json.Marshal(&models.SlackMeta{
|
||||
Channel: channel,
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -141,7 +141,7 @@ func EditRepoHook(ctx *middleware.Context, form api.EditHookOption) {
|
|||
|
||||
if w.HookTaskType == models.SLACK {
|
||||
if channel, ok := form.Config["channel"]; ok {
|
||||
meta, err := json.Marshal(&models.Slack{
|
||||
meta, err := json.Marshal(&models.SlackMeta{
|
||||
Channel: channel,
|
||||
})
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue