[PR #4299] [MERGED] Implement Default Webhooks #17323

Closed
opened 2025-11-02 12:32:35 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4299
Author: @aunger
Created: 6/22/2018
Status: Merged
Merged: 3/19/2019
Merged by: @techknowlogick

Base: masterHead: default-webhooks


📝 Commits (7)

  • 30ba097 Implement Default Webhooks
  • 08805cf Fix new org webhook links.
  • 2db60d7 Merge branch 'master' into default-webhooks
  • 81ad8e7 Merge branch 'master' into default-webhooks
  • 931b351 Merge branch 'master' into default-webhooks
  • 9a4e2c6 Merge branch 'master' into default-webhooks
  • 32b3e68 Merge branch 'master' into default-webhooks

📊 Changes

18 files changed (+252 additions, -39 deletions)

View changed files

📝 models/repo.go (+4 -0)
📝 models/webhook.go (+72 -1)
📝 options/locale/locale_en-US.ini (+5 -0)
routers/admin/hooks.go (+47 -0)
📝 routers/org/setting.go (+1 -1)
📝 routers/repo/webhook.go (+39 -20)
📝 routers/routes/routes.go (+17 -0)
templates/admin/hook_new.tmpl (+37 -0)
templates/admin/hooks.tmpl (+8 -0)
📝 templates/admin/nav.tmpl (+1 -0)
📝 templates/admin/navbar.tmpl (+4 -1)
📝 templates/repo/settings/webhook/dingtalk.tmpl (+1 -1)
📝 templates/repo/settings/webhook/discord.tmpl (+1 -1)
📝 templates/repo/settings/webhook/gitea.tmpl (+1 -1)
📝 templates/repo/settings/webhook/gogs.tmpl (+1 -1)
📝 templates/repo/settings/webhook/list.tmpl (+7 -7)
📝 templates/repo/settings/webhook/settings.tmpl (+5 -4)
📝 templates/repo/settings/webhook/slack.tmpl (+1 -1)

📄 Description

Partially implement #770. (This is only webhooks, not git hooks.)

  • Add "Default Webhooks" page in site admin UI.
  • Persist to the existing webhooks table, but store with RepoID=0 and OrgID=0.
  • Add a few handlers and templates, but mostly modify the existing ones to serve double-duty. I should point out that installations that have customized the webhooks templates (probably uncommon) will need to edit them to accomodate a slight change in the semantics of .BaseLink.
  • Upon repo creation, copy the set of default webhooks into the new repo.
  • A repo owner may delete or edit these webhooks if he doesn't like the defaults.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/4299 **Author:** [@aunger](https://github.com/aunger) **Created:** 6/22/2018 **Status:** ✅ Merged **Merged:** 3/19/2019 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `default-webhooks` --- ### 📝 Commits (7) - [`30ba097`](https://github.com/go-gitea/gitea/commit/30ba0978941034cfa743d682ccd2b90ad16f7968) Implement Default Webhooks - [`08805cf`](https://github.com/go-gitea/gitea/commit/08805cf8ca306e5561e1c519349e89b03a1a200f) Fix new org webhook links. - [`2db60d7`](https://github.com/go-gitea/gitea/commit/2db60d7b774116df6a1d75ff48c3eae122782e1c) Merge branch 'master' into default-webhooks - [`81ad8e7`](https://github.com/go-gitea/gitea/commit/81ad8e7d0d2b32948ca075f8de763fdd628a15f0) Merge branch 'master' into default-webhooks - [`931b351`](https://github.com/go-gitea/gitea/commit/931b3511013b7b5be68a4fc2ce2de4768e5074d3) Merge branch 'master' into default-webhooks - [`9a4e2c6`](https://github.com/go-gitea/gitea/commit/9a4e2c66142b0e508bd2cc1ea8e9413ec9de065d) Merge branch 'master' into default-webhooks - [`32b3e68`](https://github.com/go-gitea/gitea/commit/32b3e6878dfb934b8eb643908bf1a86f6d9a0e8c) Merge branch 'master' into default-webhooks ### 📊 Changes **18 files changed** (+252 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `models/repo.go` (+4 -0) 📝 `models/webhook.go` (+72 -1) 📝 `options/locale/locale_en-US.ini` (+5 -0) ➕ `routers/admin/hooks.go` (+47 -0) 📝 `routers/org/setting.go` (+1 -1) 📝 `routers/repo/webhook.go` (+39 -20) 📝 `routers/routes/routes.go` (+17 -0) ➕ `templates/admin/hook_new.tmpl` (+37 -0) ➕ `templates/admin/hooks.tmpl` (+8 -0) 📝 `templates/admin/nav.tmpl` (+1 -0) 📝 `templates/admin/navbar.tmpl` (+4 -1) 📝 `templates/repo/settings/webhook/dingtalk.tmpl` (+1 -1) 📝 `templates/repo/settings/webhook/discord.tmpl` (+1 -1) 📝 `templates/repo/settings/webhook/gitea.tmpl` (+1 -1) 📝 `templates/repo/settings/webhook/gogs.tmpl` (+1 -1) 📝 `templates/repo/settings/webhook/list.tmpl` (+7 -7) 📝 `templates/repo/settings/webhook/settings.tmpl` (+5 -4) 📝 `templates/repo/settings/webhook/slack.tmpl` (+1 -1) </details> ### 📄 Description Partially implement #770. (This is only webhooks, not git hooks.) - Add "Default Webhooks" page in site admin UI. - Persist to the existing webhooks table, but store with RepoID=0 and OrgID=0. - Add a few handlers and templates, but mostly modify the existing ones to serve double-duty. I should point out that installations that have customized the webhooks templates (probably uncommon) will need to edit them to accomodate a slight change in the semantics of .BaseLink. - Upon repo creation, copy the set of default webhooks into the new repo. - A repo owner may delete or edit these webhooks if he doesn't like the defaults. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:32:35 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17323