Issue
Plan and closeout for moving dp report GitHub issue creation from the CLI to the API.
Initial Situation
dp report created GitHub issues directly from the CLI through local gh auth token, GH_TOKEN, or GITHUB_TOKEN. That meant reporters needed direct write permission to wearedevpunks/harness-intelligence.
Issue
Issue #23 asks for report issue creation to happen server-side so the reporter only needs access to the Harness API. The API also needs room for creator/operator context and duplicate detection.
Plan
- Stop importing or calling the CLI-side GitHub issue client from
dp report. - Submit the raw report draft through the existing typed control-plane client to
/api/reports. - Have the API reject trolling, profanity, non-coding, and non-project reports before creating an issue.
- Have the API scan open
harness-reportissues and return the existing URL when a duplicate is found. - Create GitHub issues server-side with the API GitHub token after validating public submissions, and preserve the hidden
harness-report.v1marker for backoffice parsing. - Preserve operator and observed repository context in the marker and persisted report payload.
- Update operator docs and runbook language so they no longer require local GitHub auth for
dp report.
Result
Resolved. /api/reports now owns report validation, deterministic public metadata, duplicate checks, persistence, and server-side GitHub issue creation. Authenticated backoffice operator requests can additionally use AI metadata generation. The CLI submits typed report context and requires the API response to include a GitHub issue URL.