Fixed Git integration
This commit is contained in:
@@ -28,17 +28,17 @@ class GiteaClient:
|
||||
repo: str,
|
||||
title: str,
|
||||
body: str,
|
||||
labels: list[str] | None = None,
|
||||
) -> dict[str, Any]:
|
||||
payload: dict[str, Any] = {"title": title, "body": body}
|
||||
if labels:
|
||||
payload["labels"] = labels
|
||||
with self._client() as client:
|
||||
response = client.post(
|
||||
f"/api/v1/repos/{owner}/{repo}/issues",
|
||||
json=payload,
|
||||
json={"title": title, "body": body},
|
||||
)
|
||||
response.raise_for_status()
|
||||
if response.is_error:
|
||||
detail = response.text.strip() or response.reason_phrase
|
||||
raise ValueError(
|
||||
f"Gitea issue create failed ({response.status_code}): {detail}"
|
||||
)
|
||||
return response.json()
|
||||
|
||||
def close_issue(self, owner: str, repo: str, issue_number: int) -> dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user