Changeset - 6cb54b9ef4de
[Not reviewed]
stable
0 2 0
Manuel Jacob - 3 years ago 2023-03-29 13:01:32
me@manueljacob.de
api: include creation date in comments
2 files changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/model/db.py
Show inline comments
 
@@ -1914,6 +1914,7 @@ class ChangesetComment(meta.Base, BaseDb
 
        return dict(
 
            comment_id=self.comment_id,
 
            username=self.author.username,
 
            created_on=self.created_on.replace(microsecond=0),
 
            text=self.text,
 
        )
 

	
kallithea/tests/api/api_base.py
Show inline comments
 
@@ -2517,6 +2517,7 @@ class _BaseTestApi(object):
 
            'comment_id': commentobj.comment_id,
 
            'text': 'example changeset comment',
 
            'username': 'test_admin',
 
            'created_on': commentobj.created_on.replace(microsecond=0).isoformat(),
 
        }
 
        assert comment == expected
 

	
 
@@ -2537,6 +2538,7 @@ class _BaseTestApi(object):
 
                    'comment_id': commentobj.comment_id,
 
                    'text': 'example inline comment',
 
                    'username': 'test_admin',
 
                    'created_on': commentobj.created_on.replace(microsecond=0).isoformat(),
 
                }]
 
            }]
 
        ]
 
@@ -2584,7 +2586,8 @@ class _BaseTestApi(object):
 
            "org_ref_parts": ["branch", "stable", self.TEST_PR_SRC],
 
            "other_ref_parts": ["branch", "default", self.TEST_PR_DST],
 
            "comments": [{"username": base.TEST_USER_ADMIN_LOGIN, "text": "",
 
                         "comment_id": pullrequest.comments[0].comment_id}],
 
                          "comment_id": pullrequest.comments[0].comment_id,
 
                          "created_on": "2000-01-01T00:00:00"}],
 
            "owner": base.TEST_USER_ADMIN_LOGIN,
 
            "statuses": [{"status": "under_review", "reviewer": base.TEST_USER_ADMIN_LOGIN, "modified_at": "2000-01-01T00:00:00"} for i in range(0, len(self.TEST_PR_REVISIONS))],
 
            "title": "get test",
0 comments (0 inline, 0 general)