[PR #191] [MERGED] API Endpoint for watching #15212

Closed
opened 2025-11-02 11:41:26 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/191
Author: @ethantkoenig
Created: 11/17/2016
Status: Merged
Merged: 12/24/2016
Merged by: @lunny

Base: masterHead: api/watching


📝 Commits (1)

  • fbfd089 API Endpoint for watching

📊 Changes

3 files changed (+147 additions, -0 deletions)

View changed files

📝 models/user.go (+15 -0)
📝 routers/api/v1/api.go (+9 -0)
routers/api/v1/user/watch.go (+123 -0)

📄 Description

This pull request adds the following API endpoints:

  • GET /users/:username/subscriptions: List repositories watched by a user
  • GET /user/subscriptions: List repositories watched by authenticated user
  • GET /repos/:owner/:repo/subscription: If authenticated user is watching a repository
  • PUT /repos/:owner/:repo/subscription: Watch a repository (as authenticated user)
  • DELETE /repos/:owner/:repo/subscription: Unwatch a repository (as authenticated user)

Each of these endpoints already exists in the Github API.


🔄 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/191 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 11/17/2016 **Status:** ✅ Merged **Merged:** 12/24/2016 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `api/watching` --- ### 📝 Commits (1) - [`fbfd089`](https://github.com/go-gitea/gitea/commit/fbfd089c86387b99019e771019581575487225c4) API Endpoint for watching ### 📊 Changes **3 files changed** (+147 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `models/user.go` (+15 -0) 📝 `routers/api/v1/api.go` (+9 -0) ➕ `routers/api/v1/user/watch.go` (+123 -0) </details> ### 📄 Description This pull request adds the following API endpoints: - `GET /users/:username/subscriptions`: List repositories watched by a user - `GET /user/subscriptions`: List repositories watched by authenticated user - `GET /repos/:owner/:repo/subscription`: If authenticated user is watching a repository - `PUT /repos/:owner/:repo/subscription`: Watch a repository (as authenticated user) - `DELETE /repos/:owner/:repo/subscription`: Unwatch a repository (as authenticated user) Each of these endpoints already exists in [the Github API](https://developer.github.com/v3/activity/watching/). --- <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:41:26 -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#15212