fix: Gitea labels as body text, demote parse log to debug
Some checks failed
CI / Format (push) Successful in 4s
CI / Clippy (push) Failing after 1m46s
CI / Security Audit (push) Has been skipped
CI / Tests (push) Has been skipped
CI / Detect Changes (push) Has been skipped
CI / Deploy Agent (push) Has been skipped
CI / Deploy Dashboard (push) Has been skipped
CI / Deploy Docs (push) Has been skipped
CI / Deploy MCP (push) Has been skipped

Gitea API expects label IDs (integers), not names. Append label names
to the issue body instead. Also lower "Parsing file" log from info to
debug to reduce noise.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sharang Parnerkar
2026-03-11 10:53:43 +01:00
parent 570e3c5c9e
commit 9e5342bfd6
2 changed files with 11 additions and 9 deletions

View File

@@ -38,15 +38,17 @@ impl IssueTracker for GiteaTracker {
) -> Result<TrackerIssue, CoreError> { ) -> Result<TrackerIssue, CoreError> {
let url = self.api_url(&format!("/repos/{owner}/{repo}/issues")); let url = self.api_url(&format!("/repos/{owner}/{repo}/issues"));
let mut payload = serde_json::json!({ // Gitea expects label IDs (integers), not names. Append label names
"title": title, // to the body instead since resolving IDs would require extra API calls.
"body": body, let mut full_body = body.to_string();
});
if !labels.is_empty() { if !labels.is_empty() {
// Gitea expects label IDs, but we can pass label names via the API full_body.push_str("\n\n**Labels:** ");
// For simplicity, we add labels as part of the body if they can't be resolved full_body.push_str(&labels.join(", "));
payload["labels"] = serde_json::json!(labels);
} }
let payload = serde_json::json!({
"title": title,
"body": full_body,
});
let resp = self let resp = self
.http .http

View File

@@ -3,7 +3,7 @@ use std::path::Path;
use compliance_core::error::CoreError; use compliance_core::error::CoreError;
use compliance_core::traits::graph_builder::{LanguageParser, ParseOutput}; use compliance_core::traits::graph_builder::{LanguageParser, ParseOutput};
use tracing::info; use tracing::{debug, info};
use super::javascript::JavaScriptParser; use super::javascript::JavaScriptParser;
use super::python::PythonParser; use super::python::PythonParser;
@@ -65,7 +65,7 @@ impl ParserRegistry {
}; };
let parser = &self.parsers[parser_idx]; let parser = &self.parsers[parser_idx];
info!( debug!(
file = %file_path.display(), file = %file_path.display(),
language = parser.language(), language = parser.language(),
"Parsing file" "Parsing file"