From fe8366accfa6781a629062cac6aeff0905e8748e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 13 2017 14:52:53 +0000 Subject: Document the different watch status that can be set in update_watch_status This is helpful when trying to figure things out and saves you from having to go read the code Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index f9d5b3e..f7b8203 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -3593,6 +3593,14 @@ def get_pull_request_of_user(session, username): def update_watch_status(session, project, user, watch): ''' Update the user status for watching a project. + + The watch status can be: + -1: reset the watch status to default + 0: unwatch, don't notify the user of anything + 1: watch issues and PRs + 2: watch commits + 3: watch issues, PRs and commits + ''' if watch not in ['-1', '0', '1', '2', '3']: raise pagure.exceptions.PagureException(