fix: Fix AttributeError issues in GitLab tools#18
Merged
Vijay-Duke merged 1 commit intomainfrom Aug 12, 2025
Merged
Conversation
Added the following missing methods to GitLabClient: - get_repository_tree: List files and directories in repository - search_in_project: Search within a project (blobs, issues, commits, etc.) - summarize_merge_request: Generate AI-friendly MR summary - batch_operations: Execute multiple operations in batch These methods were being called by tool handlers but didn't exist, causing AttributeError exceptions. The safe_preview_commit method already exists from a previous PR. Fixes: - gitlab_list_repository_tree functionality - gitlab_list_commits functionality (handler was calling get_commits) - gitlab_search_in_project functionality - gitlab_summarize_merge_request functionality - gitlab_batch_operations functionality
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes multiple AttributeError exceptions that were occurring when using various GitLab tools. The tool handlers were calling methods that didn't exist in the GitLabClient class.
Problem
The following tools were failing with AttributeError:
gitlab_list_repository_tree- Handler was callingget_repository_tree()which didn't existgitlab_list_commits- Handler exists but callsget_commits()(which exists from PR feat: Add commit and diff methods to GitLabClient #16)gitlab_search_in_project- Handler was callingsearch_in_project()which didn't existgitlab_summarize_merge_request- Handler was callingsummarize_merge_request()which didn't existgitlab_batch_operations- Handler was callingbatch_operations()which didn't existgitlab_safe_preview_commit- Already fixed in PR feat: Add commit and diff methods to GitLabClient #16Solution
Added the missing methods to GitLabClient:
1.
get_repository_tree()2.
search_in_project()3.
summarize_merge_request()4.
batch_operations()Changes
@retry_on_error()decorator for network resilienceTesting
All existing tool handlers should now work without AttributeError exceptions. The methods follow the same patterns as existing GitLabClient methods for consistency.
Related Issues
This fixes the reported failures where tools were throwing AttributeError exceptions when trying to call non-existent methods.