src/auth.rs:42

Updated Jul 27, 2026

Reviewer: alice Created: 2025-01-15T10:30:00Z

Consider using a constant here instead of a magic number.

@@ -40,3 +40,5 @@ fn validate_token(token: &str) -> bool {
-    token.len() > 0
+    token.len() > 8
 }

```---

JSONL format example

{"id":456,"author":"alice","file_path":"src/auth.rs","line_number":42,"body":"Consider using a constant here.","diff_hunk":"@@ -40,3 +40,5 @@...","commit_sha":"abc123","created_at":"2025-01-15T10:30:00Z"}
{"id":457,"author":"bob","file_path":"src/auth.rs","line_number":50,"body":"Add error handling.","diff_hunk":"@@ -48,3 +48,5 @@...","commit_sha":"abc123","created_at":"2025-01-15T11:00:00Z"}

Custom template format

For maximum flexibility, use a Jinja2-compatible template with the template format:

frankie --pr-url https://github.com/owner/repo/pull/123 --export template \
        --template my-template.j2 --output comments.txt

Template syntax

Templates use Jinja2 syntax (via the minijinja engine):

  • {{ variable }} — variable interpolation
  • {% for item in list %}...{% endfor %} — loops
  • {{ list | length }} — filters

Available variables

Document-level (available anywhere in the template):

Table: Document-level variables.

Variable Description
pr_url Pull request URL
generated_at Export timestamp (ISO 8601)
comments List of comment objects

Comment-level (inside {% for c in comments %}):

Table: Comment-level variables.

Variable Description
c.id Comment ID
c.file File path
c.line Line number
c.reviewer Comment author
c.status "reply" or "comment"
c.body Comment text
c.context Diff hunk (code context)
c.commit Commit SHA
c.timestamp Creation timestamp
c.reply_to Parent comment ID (if reply)

Example template

```jinja2

Comments for {{ pr_url }}

Generated: {{ generated_at }}

{% for c in comments %}