Content-Length: 1589 | pFad | http://github.com/github/github-mcp-server/pull/548.patch
thub.com
From 0326014be7860cc7bc34610807f9f6fdee8f4d8d Mon Sep 17 00:00:00 2001
From: Sam Morrow
Date: Wed, 18 Jun 2025 18:18:41 +0200
Subject: [PATCH] experiment with resource results for failed job logs
---
pkg/github/actions.go | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/pkg/github/actions.go b/pkg/github/actions.go
index 527a426ed..a2968ef9d 100644
--- a/pkg/github/actions.go
+++ b/pkg/github/actions.go
@@ -696,6 +696,35 @@ func handleFailedJobLogs(ctx context.Context, client *github.Client, owner, repo
return nil, fmt.Errorf("failed to marshal response: %w", err)
}
+ if returnContent {
+ // return mcp.NewToolResultResource("failed job logs", , nil
+
+ content := []mcp.Content{
+ mcp.TextContent{
+ Type: "text",
+ Text: "Failed job logs for workflow run " + strconv.FormatInt(runID, 10),
+ }}
+
+ for _, jobLog := range logResults {
+ log, err := json.Marshal(jobLog)
+ if err != nil {
+ return nil, fmt.Errorf("failed to marshal job log: %w", err)
+ }
+
+ jobContent := mcp.EmbeddedResource{
+ Type: "resource",
+ Resource: mcp.TextResourceContents{
+ Text: string(log),
+ MIMEType: "application/json",
+ URI: "actions://" + owner + "/repo/" + repo + "/jobs/" + strconv.FormatInt(runID, 10) + "/failed_logs/" + strconv.FormatInt(jobLog["job_id"].(int64), 10) + ".json",
+ },
+ }
+ content = append(content, jobContent)
+ }
+ return &mcp.CallToolResult{
+ Content: content,
+ }, nil
+ }
return mcp.NewToolResultText(string(r)), nil
}
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/github/github-mcp-server/pull/548.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy