From 1427744328fcec67a7efd342d7bb75d7a022df2e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 19 2016 22:08:25 +0000 Subject: Add the possibility for comments to be just notification Notifications are comments that are show differently and cannot be edited. They are made by the system under the name of the user who opened the PR. --- diff --git a/pagure/lib/model.py b/pagure/lib/model.py index ab6a98a..e5d7efe 100644 --- a/pagure/lib/model.py +++ b/pagure/lib/model.py @@ -971,6 +971,7 @@ class PullRequestComment(BASE): sa.Integer, sa.ForeignKey('pull_request_comments.id', onupdate='CASCADE'), nullable=True) + notification = sa.Column(sa.Boolean, default=False, nullable=False) edited_on = sa.Column(sa.DateTime, nullable=True) editor_id = sa.Column( sa.Integer, @@ -1021,6 +1022,7 @@ class PullRequestComment(BASE): 'user': self.user.to_json(public=public), 'edited_on': self.edited_on.strftime('%s') if self.edited_on else None, 'editor': self.editor.to_json(public=public) if self.editor_id else None, + 'notification': self.notification, }