diff --git a/src/fosslight_util/oss_item.py b/src/fosslight_util/oss_item.py index c31eab7..0154a7c 100644 --- a/src/fosslight_util/oss_item.py +++ b/src/fosslight_util/oss_item.py @@ -82,14 +82,15 @@ def comment(self): return self._comment @comment.setter - def comment(self, value): - if not value: + def comment(self, new_comment): + if not new_comment: self._comment = "" else: if self._comment: - self._comment = f"{self._comment} / {value}" + if new_comment.strip() not in self._comment: + self._comment = f"{self._comment}\n{new_comment}" else: - self._comment = value + self._comment = new_comment class FileItem: