if not builds:
return
+ # Fetch all watchers
+ watchers = await self.get_watchers()
+
# Create a build group for all tests
group = await self.backend.builds.create_group(
owner = self.owner,
build = max(builds[name])
# Create a new test build
- await self.backend.builds.create(
+ build = await self.backend.builds.create(
# Use the same build repository
repo = self.repo,
package = build.pkg,
test = True,
)
+ # Add all watchers of the build to the test builds
+ for watcher in watchers:
+ await build.add_watcher(watcher.user)
+
# Return the group
return group