[PR #372] [MERGED] Organziation webhook API endpoints #15343

Closed
opened 2025-11-02 11:44:27 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/372
Author: @ethantkoenig
Created: 12/9/2016
Status: Merged
Merged: 12/25/2016
Merged by: @bkcsoft

Base: masterHead: api/org_webhooks


📝 Commits (2)

📊 Changes

7 files changed (+398 additions, -140 deletions)

View changed files

📝 routers/api/v1/api.go (+9 -1)
routers/api/v1/org/hook.go (+65 -0)
📝 routers/api/v1/repo/hook.go (+15 -133)
routers/api/v1/utils/hook.go (+227 -0)
📝 vendor/code.gitea.io/sdk/gitea/hook.go (+48 -3)
📝 vendor/code.gitea.io/sdk/gitea/repo_collaborator.go (+31 -0)
📝 vendor/vendor.json (+3 -3)

📄 Description

Adds the following API endpoints:

  • GET repos/:owner/:reponame/hooks/:id: Get a single repo webhook
  • GET orgs/:orgname/hooks: Get an organization's webhooks
  • GET orgs/:orgname/hooks/:id: Get a single organization webhook
  • POST orgs/:orgname/hooks: Create an organization webhook
  • PATCH orgs/:orgname/hooks/:id: Update an organization webhook
  • DELETE orgs/:orgname/hooks/:id: Delete an organization webhook

All these endpoints exists in the Github API (see orgs, repos)

I've added routers/api/v1/utils/hook.go, which contains functionality that is shared between repo webhook and organization webhook endpoints.


🔄 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/372 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 12/9/2016 **Status:** ✅ Merged **Merged:** 12/25/2016 **Merged by:** [@bkcsoft](https://github.com/bkcsoft) **Base:** `master` ← **Head:** `api/org_webhooks` --- ### 📝 Commits (2) - [`c7cf99b`](https://github.com/go-gitea/gitea/commit/c7cf99bf651131f494adb880c6227c78950b1486) Organization webhook API endpoints - [`a536ae5`](https://github.com/go-gitea/gitea/commit/a536ae55b3002379f34fb7cdfedf03c155ca0f68) Update sdk ### 📊 Changes **7 files changed** (+398 additions, -140 deletions) <details> <summary>View changed files</summary> 📝 `routers/api/v1/api.go` (+9 -1) ➕ `routers/api/v1/org/hook.go` (+65 -0) 📝 `routers/api/v1/repo/hook.go` (+15 -133) ➕ `routers/api/v1/utils/hook.go` (+227 -0) 📝 `vendor/code.gitea.io/sdk/gitea/hook.go` (+48 -3) 📝 `vendor/code.gitea.io/sdk/gitea/repo_collaborator.go` (+31 -0) 📝 `vendor/vendor.json` (+3 -3) </details> ### 📄 Description Adds the following API endpoints: - `GET repos/:owner/:reponame/hooks/:id`: Get a single repo webhook - `GET orgs/:orgname/hooks`: Get an organization's webhooks - `GET orgs/:orgname/hooks/:id`: Get a single organization webhook - `POST orgs/:orgname/hooks`: Create an organization webhook - `PATCH orgs/:orgname/hooks/:id`: Update an organization webhook - `DELETE orgs/:orgname/hooks/:id`: Delete an organization webhook All these endpoints exists in the Github API (see [orgs](https://developer.github.com/v3/orgs/hooks/), [repos](https://developer.github.com/v3/repos/hooks/)) I've added `routers/api/v1/utils/hook.go`, which contains functionality that is shared between repo webhook and organization webhook endpoints. --- <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 11:44:27 -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#15343