"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GitHubIssuesProvider = void 0; const rest_1 = require("@octokit/rest"); class GitHubIssuesProvider { constructor(token, repo) { this.octokit = new rest_1.Octokit({ auth: token }); const [owner, repoName] = repo.split('/'); this.owner = owner; this.repo = repoName; } async sendFinding(finding) { const stepsSection = finding.steps && finding.steps.length > 0 ? `\n\n## Reproduction Steps\n${finding.steps.map((s, i) => `${i + 1}. ${s}`).join('\n')}` : ''; const body = `## ABE Security Finding **Severity:** ${finding.severity.toUpperCase()} **Type:** ${finding.type} **Session:** ${finding.sessionId} ## Description ${finding.description}${stepsSection} --- *Generated by [ABE — Autonomous Bug Explorer](https://github.com/your-org/abe)*`; await this.octokit.issues.create({ owner: this.owner, repo: this.repo, title: `[ABE] [${finding.severity.toUpperCase()}] ${finding.title}`, body, labels: ['bug', 'abe-finding', `severity:${finding.severity}`], }); } } exports.GitHubIssuesProvider = GitHubIssuesProvider;