Remove all watchers from a repository #2841

Closed
opened 2025-11-02 04:50:40 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @markusamshove on GitHub (Jan 31, 2019).

  • Gitea version (or commit ref): 1.7
  • Database (use [x]):
    • PostgreSQL
  • Can you reproduce the bug at https://try.gitea.io:
    • Not relevant

Description

I've migrated all our corporate repositories to a selfhosted Gitea instance and we're liking it a lot so far.

The migration was done via the REST API for every repository we had on another hosting service.

I'd like to turn on email notifications for mentions and PRs, but the migration sadly added all users as watchers to all repositories.

Is it possible to remove all watcher from all repositories? At the moment developers would get emails even for repositories they don't care about.

Originally created by @markusamshove on GitHub (Jan 31, 2019). - Gitea version (or commit ref): 1.7 - Database (use `[x]`): - [x] PostgreSQL - Can you reproduce the bug at https://try.gitea.io: - [x] Not relevant ## Description I've migrated all our corporate repositories to a selfhosted Gitea instance and we're liking it a lot so far. The migration was done via the REST API for every repository we had on another hosting service. I'd like to turn on email notifications for mentions and PRs, but the migration sadly added all users as watchers to all repositories. Is it possible to remove all watcher from all repositories? At the moment developers would get emails even for repositories they don't care about.
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 04:50:40 -06:00
Author
Owner

@markusamshove commented on GitHub (Jan 31, 2019):

Maybe there is a save SQL statement I can run? :-)

@markusamshove commented on GitHub (Jan 31, 2019): Maybe there is a save SQL statement I can run? :-)
Author
Owner

@lafriks commented on GitHub (Jan 31, 2019):

Yes you can easily remove that using sql

@lafriks commented on GitHub (Jan 31, 2019): Yes you can easily remove that using sql
Author
Owner

@sebastian-sauer commented on GitHub (Feb 1, 2019):

What you should keep in mind is that currently all users of a team will watch new repos added to the team by default and i think a new user added to a team will watch all repos of the team automatically.

There is a merged PR for 1.8 (#5852) to disable this automatic behaviour.

@sebastian-sauer commented on GitHub (Feb 1, 2019): What you should keep in mind is that currently all users of a team will watch new repos added to the team by default and i think a new user added to a team will watch all repos of the team automatically. There is a merged PR for 1.8 (#5852) to disable this automatic behaviour.
Author
Owner

@markusamshove commented on GitHub (Feb 1, 2019):

DELETE FROM watch was all I had to do and was save to execute.
Gitea needed to be restarted to see the changes in the UI.

The setting from #5852 will fix the original issue, so I'm closing 😄

@markusamshove commented on GitHub (Feb 1, 2019): `DELETE FROM watch` was all I had to do and was save to execute. Gitea needed to be restarted to see the changes in the UI. The setting from #5852 will fix the original issue, so I'm closing 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2841