This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/misc_aug_2023
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 3a0bfcee79667e79ff178cfe0457048564573f86
Author: Dave Brondsema <[email protected]>
AuthorDate: Mon Aug 21 17:14:33 2023 -0400

    [#2023] add is_meta to API for posts
---
 Allura/allura/model/discuss.py            | 4 +++-
 Allura/docs/api-rest/examples/ticket.json | 5 ++++-
 Allura/docs/api-rest/schemas/ticket.json  | 6 +++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index 24288966d..3ecb42907 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -227,7 +227,9 @@ class Thread(Artifact, ActivityObject):
                         author_icon_url=h.absurl(p.author().icon_url()),
                         timestamp=p.timestamp,
                         last_edited=p.last_edit_date,
-                        attachments=self.attachment_for_export(p) if is_export 
else self.attachments_for_json(p))
+                        attachments=self.attachment_for_export(p) if is_export 
else self.attachments_for_json(p),
+                        is_meta=p.is_meta,
+                        )
                    for p in self.query_posts(status='ok', 
style='chronological', limit=limit, page=page)
                    ]
         )
diff --git a/Allura/docs/api-rest/examples/ticket.json 
b/Allura/docs/api-rest/examples/ticket.json
index f4ba99025..ec9421418 100755
--- a/Allura/docs/api-rest/examples/ticket.json
+++ b/Allura/docs/api-rest/examples/ticket.json
@@ -20,6 +20,7 @@
       "posts": [
         {
           "text": "- **labels**:  --> sf-2, sf-current\n",
+          "is_meta": true,
           "attachments": [],
           "author": "brondsem",
           "timestamp": "2015-07-13 15:53:20.175000",
@@ -29,6 +30,7 @@
         },
         {
           "text": "- **status**: in-progress --> review\n",
+          "is_meta": true,
           "attachments": [],
           "author": "heiths",
           "timestamp": "2015-07-16 19:10:50.153000",
@@ -38,6 +40,7 @@
         },
         {
           "text": "QA: **hs/7925**\r\n\r\nBinary files should no longer make 
XHR requests for diff processing.",
+          "is_meta": false,
           "attachments": [],
           "author": "heiths",
           "timestamp": "2015-07-16 19:10:50.511000",
@@ -62,4 +65,4 @@
     },
     "created_date": "2015-07-13 15:04:19.926000"
   }
-}
\ No newline at end of file
+}
diff --git a/Allura/docs/api-rest/schemas/ticket.json 
b/Allura/docs/api-rest/schemas/ticket.json
index 48aec8d76..3dff31a80 100755
--- a/Allura/docs/api-rest/schemas/ticket.json
+++ b/Allura/docs/api-rest/schemas/ticket.json
@@ -83,6 +83,10 @@
                                         "id": "text",
                                         "type": "string"
                                     },
+                                    "is_meta": {
+                                        "id": "is_meta",
+                                        "type": "boolean"
+                                    },
                                     "attachments": {
                                         "id": "attachments",
                                         "type": "array",
@@ -177,4 +181,4 @@
         }
     },
     "additionalProperties": false
-}
\ No newline at end of file
+}

Reply via email to