~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH todo.sr.ht] Remove ability to create an issue comment with only whitespace

Details
Message ID
<20220331214355.55100-1-martijn@brixit.nl>
DKIM signature
missing
Download raw message
Patch: +2 -2
---
 todosrht/blueprints/ticket.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/todosrht/blueprints/ticket.py b/todosrht/blueprints/ticket.py
index b04e560..3f1bcb3 100644
--- a/todosrht/blueprints/ticket.py
+++ b/todosrht/blueprints/ticket.py
@@ -158,7 +158,7 @@ def ticket_comment_POST(owner, name, ticket_id):
    reopen = valid.optional("reopen")
    preview = valid.optional("preview")

    valid.expect(not text or 3 <= len(text) <= 16384,
    valid.expect(not text or 3 <= len(text.strip()) <= 16384,
            "Comment must be between 3 and 16384 characters.", field="comment")
    valid.expect(text or resolve or reopen,
            "Comment is required", field="comment")
@@ -245,7 +245,7 @@ def ticket_comment_edit_POST(owner, name, ticket_id, comment_id):
    valid = Validation(request)
    text = valid.require("text", friendly_name="Comment text")
    preview = valid.optional("preview")
    valid.expect(not text or 3 <= len(text) <= 16384,
    valid.expect(not text or 3 <= len(text.strip()) <= 16384,
            "Comment must be between 3 and 16384 characters.", field="text")
    if not valid.ok:
        ctx = get_ticket_context(ticket, tracker, tiaccess)
-- 
2.35.1

[todo.sr.ht/patches] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CIYDSTL83U0Q.1FPH7BE0I2FCL@cirno>
In-Reply-To
<20220331214355.55100-1-martijn@brixit.nl> (view parent)
DKIM signature
missing
Download raw message
todo.sr.ht/patches: SUCCESS in 3m37s

[Remove ability to create an issue comment with only whitespace][0] from [Martijn Braam][1]

[0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/30706
[1]: martijn@brixit.nl

✓ #727596 SUCCESS todo.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/727596
✓ #727595 SUCCESS todo.sr.ht/patches/alpine.yml    https://builds.sr.ht/~sircmpwn/job/727595
✓ #727597 SUCCESS todo.sr.ht/patches/debian.yml    https://builds.sr.ht/~sircmpwn/job/727597
Details
Message ID
<CJ4SDZ29J2PS.8Z8Q9I3M7ZP5@taiga>
In-Reply-To
<20220331214355.55100-1-martijn@brixit.nl> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
Can you make a similar change for the GraphQL API?
Reply to thread Export thread (mbox)