AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(backend): serialize the pydantic objects correctly for github checks and statuses (#9582)
Nicholas Tindle5b8947ed933b
diff --git a/autogpt_platform/backend/backend/blocks/github/checks.py b/autogpt_platform/backend/backend/blocks/github/checks.pyindex 6d9ac1897c..070b5179e8 100644--- a/autogpt_platform/backend/backend/blocks/github/checks.py+++ b/autogpt_platform/backend/backend/blocks/github/checks.py@@ -172,7 +172,9 @@ class GithubCreateCheckRunBlock(Block):data.output = output_datacheck_runs_url = f"{repo_url}/check-runs"- response = api.post(check_runs_url)+ response = api.post(+ check_runs_url, data=data.model_dump_json(exclude_none=True)+ )result = response.json()return {@@ -323,7 +325,9 @@ class GithubUpdateCheckRunBlock(Block):data.output = output_datacheck_run_url = f"{repo_url}/check-runs/{check_run_id}"- response = api.patch(check_run_url)+ response = api.patch(+ check_run_url, data=data.model_dump_json(exclude_none=True)+ )result = response.json()return {diff --git a/autogpt_platform/backend/backend/blocks/github/statuses.py b/autogpt_platform/backend/backend/blocks/github/statuses.pyindex 8abf27928f..a69b0e3d61 100644--- a/autogpt_platform/backend/backend/blocks/github/statuses.py+++ b/autogpt_platform/backend/backend/blocks/github/statuses.py@@ -144,7 +144,7 @@ class GithubCreateStatusBlock(Block):data.description = descriptionstatus_url = f"{repo_url}/statuses/{sha}"- response = api.post(status_url, json=data)+ response = api.post(status_url, data=data.model_dump_json(exclude_none=True))result = response.json()return {