From cb661cd971b7a219c33e24875d23afafc6a48334 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 11 Jan 2015 00:59:09 +0100 Subject: Add to notification list on repository creation Since commit bf7717a (git-serve.py: Adopt repositories on creation, 2015-01-06), newly created package bases are no longer orphan and therefore, they are not adopted when pushing the first commit which also means that the initial submitter is not added to the notification list automatically. To remedy this, add the owner to the notification list when setting up a new repository. Signed-off-by: Lukas Fleischer --- scripts/git-integration/git-serve.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts/git-integration') diff --git a/scripts/git-integration/git-serve.py b/scripts/git-integration/git-serve.py index 227e37b9..6f4d4f95 100755 --- a/scripts/git-integration/git-serve.py +++ b/scripts/git-integration/git-serve.py @@ -78,6 +78,10 @@ def setup_repo(repo, user): cur.execute("INSERT INTO PackageBases (Name, SubmittedTS, ModifiedTS, " + "SubmitterUID, MaintainerUID) VALUES (%s, UNIX_TIMESTAMP(), " + "UNIX_TIMESTAMP(), %s, %s)", [repo, userid, userid]) + pkgbase_id = cur.lastrowid + + cur.execute("INSERT INTO CommentNotify (PackageBaseID, UserID) " + + "VALUES (%s, %s)", [pkgbase_id, userid]) db.commit() db.close() -- cgit v1.2.3-24-g4f1b