From: Michael Tremer Date: Thu, 13 Oct 2022 09:31:01 +0000 (+0000) Subject: builds: Add dummy function to add watchers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e36bb9fedb6767c93f970eee33d718fb8e2057a;p=pbs.git builds: Add dummy function to add watchers Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/builds.py b/src/buildservice/builds.py index d5bfde28..7a0c4550 100644 --- a/src/buildservice/builds.py +++ b/src/buildservice/builds.py @@ -183,6 +183,9 @@ class Builds(base.Object): # XXX obsolete other builds + # Add watchers + build._add_watchers() + return build async def create_from_source_package(self, filename, distro, commit=None, type="release", @@ -615,6 +618,18 @@ class Build(base.DataObject): # Remove from cache self.watchers.remove(user) + def _add_watchers(self): + """ + Called when a new build is created and automatically adds any watchers + """ + # Add the owner of the build (if any) + if self.owner: + self.add_watcher(self.owner) + + # XXX extract any watchers from the commit message (if any) + + # XXX add any permanent watchers + @property def message_recipients(self): ret = []