feat: replace local bug store with Gitea-backed issue tracker and add AI-enhanced filing
This commit is contained in:
@@ -816,18 +816,67 @@ ACTIONS: tuple[Action, ...] = (
|
||||
name="list_bugs",
|
||||
method="GET",
|
||||
path="/bugs",
|
||||
summary="List reported bugs",
|
||||
summary="List bug tickets from the Gitea tracker",
|
||||
requires_auth=False,
|
||||
params=(
|
||||
query("state", "Filter by state: open, closed, or all."),
|
||||
query("page", "1-based page number."),
|
||||
),
|
||||
),
|
||||
Action(
|
||||
name="create_bug",
|
||||
method="POST",
|
||||
path="/bugs/create",
|
||||
summary="Report a bug",
|
||||
summary="Report a bug. It is rewritten by AI and filed on the tracker.",
|
||||
description=(
|
||||
"Queues a background bug creation job and returns {uid, status_url}. Poll the "
|
||||
"status_url with bug_job_status until status is 'done', then show the user the "
|
||||
"bug_url pointing at the filed ticket."
|
||||
),
|
||||
params=(
|
||||
body("title", "Bug title.", required=True),
|
||||
body("description", "Bug description.", required=True),
|
||||
body("attachment_uids", ATTACHMENTS),
|
||||
),
|
||||
),
|
||||
Action(
|
||||
name="bug_job_status",
|
||||
method="GET",
|
||||
path="/bugs/jobs/{uid}",
|
||||
summary="Poll a bug creation job and obtain the filed bug ticket URL once finished",
|
||||
description=(
|
||||
"Returns the job status. When status is 'done', bug_url and number are populated; "
|
||||
"while 'pending' or 'running', poll again shortly."
|
||||
),
|
||||
params=(path("uid", "Bug job uid returned by create_bug."),),
|
||||
requires_auth=False,
|
||||
),
|
||||
Action(
|
||||
name="view_bug",
|
||||
method="GET",
|
||||
path="/bugs/{number}",
|
||||
summary="View a bug ticket and its developer updates",
|
||||
requires_auth=False,
|
||||
params=(path("number", "The bug ticket number from a /bugs listing."),),
|
||||
),
|
||||
Action(
|
||||
name="comment_bug",
|
||||
method="POST",
|
||||
path="/bugs/{number}/comment",
|
||||
summary="Post a comment on a bug ticket, attributed to the current user",
|
||||
params=(
|
||||
path("number", "The bug ticket number."),
|
||||
body("body", "Comment text.", required=True),
|
||||
),
|
||||
),
|
||||
Action(
|
||||
name="set_bug_status",
|
||||
method="POST",
|
||||
path="/bugs/{number}/status",
|
||||
summary="Change a bug ticket status (admin only)",
|
||||
requires_admin=True,
|
||||
params=(
|
||||
path("number", "The bug ticket number."),
|
||||
body("status", "New status: open or closed.", required=True),
|
||||
),
|
||||
),
|
||||
Action(
|
||||
|
||||
Reference in New Issue
Block a user