fix: correct "bugs" to "issues" in routing table and README references across multiple documentation files
This commit is contained in:
@@ -10,7 +10,7 @@ CATEGORY_BY_PREFIX: dict[str, str] = {
|
||||
"post": "content",
|
||||
"comment": "content",
|
||||
"gist": "content",
|
||||
"bug": "content",
|
||||
"issue": "content",
|
||||
"vote": "engagement",
|
||||
"reaction": "engagement",
|
||||
"bookmark": "engagement",
|
||||
|
||||
@@ -4,9 +4,10 @@ import json
|
||||
import logging
|
||||
from typing import Any, Optional
|
||||
|
||||
from devplacepy.utils import strip_html
|
||||
from devplacepy.utils import strip_html, generate_uid
|
||||
from devplacepy.services.audit import store
|
||||
from devplacepy.services.audit.categories import category_for
|
||||
from devplacepy.services.background import background
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -160,6 +161,11 @@ def _coerce_scalar(value: Any) -> Optional[str]:
|
||||
return str(value)
|
||||
|
||||
|
||||
def _persist(row: dict, links: list[dict]) -> None:
|
||||
audit_uid = store.insert_event(row)
|
||||
store.insert_links(audit_uid, links)
|
||||
|
||||
|
||||
def _write(
|
||||
*,
|
||||
event_key: str,
|
||||
@@ -184,7 +190,10 @@ def _write(
|
||||
resolved_via = via_agent
|
||||
if resolved_via is None:
|
||||
resolved_via = 1 if request_fields.get("devii") else 0
|
||||
audit_uid = generate_uid()
|
||||
row = {
|
||||
"uid": audit_uid,
|
||||
"created_at": store.now(),
|
||||
"event_key": event_key,
|
||||
"category": category or category_for(event_key),
|
||||
"actor_kind": base_actor.get("actor_kind"),
|
||||
@@ -213,8 +222,7 @@ def _write(
|
||||
all_links.append(
|
||||
actor(base_actor["actor_uid"], base_actor.get("actor_username"))
|
||||
)
|
||||
audit_uid = store.insert_event(row)
|
||||
store.insert_links(audit_uid, all_links)
|
||||
background.submit(_persist, row, all_links)
|
||||
logger.debug(
|
||||
"audit %s by %s/%s result=%s origin=%s",
|
||||
event_key,
|
||||
|
||||
Reference in New Issue
Block a user