Skip to main content

Module api_issues

Module api_issues 

Source
Expand description

The issues JSON API: list, thread, create, comment, close / reopen, retitle and label assignment.

Follows the JSS forge apiIssuesHandler family (apiIssueList, apiIssueGet, apiIssueCreate, apiIssueComment, apiIssueState, apiIssueRetitle), cited by name only.

Moderation rule (JSS mayModerate): close, reopen, retitle and label changes are index-only operations allowed to the repo owner or the issue’s author. Every spine write runs under the per-repo issue lock (crate::locks); the lock is never held across the pod-body verification fetch.

Divergence from JSS: a pod agent must hand a resourceUrl pointer (the body is PUT into its own pod by the client). JSS can also write the body into the pod itself with a forwarded bearer; the Rust forge has no loopback write, so that variant answers 422. Podless did:nostr agents post the body inline and the forge hosts it, exactly as in JSS.

Constants§

ISSUES_PER_PAGE
Issues per page (JSS ISSUES_PER_PAGE).
ISSUE_BODY_CAP
Issue / comment body cap in bytes (JSS ISSUE_BODY_CAP).
ISSUE_TITLE_CAP
Issue title cap in characters (JSS ISSUE_TITLE_CAP).

Functions§

author_meta
Additive author metadata for the JSON API (JSS authorMeta).
npub_encode
npub1… (NIP-19) for a 64-hex public key.
owner_from_webid
Pod username (or hostname label) of a WebID, mirroring JSS ownerFromAgent for non-did:nostr agents.
parse_issue_number
JSS ISSUE_NUM_RE: ^[1-9][0-9]{0,8}$.