[Bug] merge_pull_request returns 422 due to wrong parameter name (merge_strategy vs do) #5

Closed
opened 2026-01-15 13:49:12 +00:00 by xcaliber · 0 comments
Owner

Description:
The merge_pull_request tool in gitea/dev.py returns HTTP 422 error when attempting to merge pull requests.

Expected Behavior:
PR should merge successfully when using the tool.

Actual Behavior:

HTTP Error 422: [Do]: Required

Root Cause:
Gitea API expects a do parameter (e.g., {"do": "merge"}), but the tool is sending merge_strategy as the parameter name.

Proposed Fix:
Update the merge_pull_request function to send {"do": "merge"} instead of {"merge_strategy": "merge"} in the request body.

Affected File:
open-webui-automation/tools/gitea/dev.py

Severity:
Medium - Blocks PR merging operations.

**Description:** The `merge_pull_request` tool in `gitea/dev.py` returns HTTP 422 error when attempting to merge pull requests. **Expected Behavior:** PR should merge successfully when using the tool. **Actual Behavior:** ``` HTTP Error 422: [Do]: Required ``` **Root Cause:** Gitea API expects a `do` parameter (e.g., `{"do": "merge"}`), but the tool is sending `merge_strategy` as the parameter name. **Proposed Fix:** Update the `merge_pull_request` function to send `{"do": "merge"}` instead of `{"merge_strategy": "merge"}` in the request body. **Affected File:** `open-webui-automation/tools/gitea/dev.py` **Severity:** Medium - Blocks PR merging operations.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui-automation/tools#5
No description provided.