Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions gitlab/v4/objects/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,8 @@ def repository_archive(

@cli.register_custom_action(cls_names="Project", required=("refs",))
@exc.on_http_error(exc.GitlabGetError)
def repository_merge_base(
self, refs: list[str], **kwargs: Any
) -> dict[str, Any] | requests.Response:
"""Return a diff between two branches/commits.
def repository_merge_base(self, refs: list[str], **kwargs: Any) -> dict[str, Any]:
"""Return the common ancestor commit for the given refs.

Args:
refs: The refs to find the common ancestor of. Multiple refs can be passed.
Expand All @@ -351,7 +349,10 @@ def repository_merge_base(
custom_types={"refs": types.ArrayAttribute},
transform_data=True,
)
return self.manager.gitlab.http_get(path, query_data=query_data, **kwargs)
result = self.manager.gitlab.http_get(path, query_data=query_data, **kwargs)
if TYPE_CHECKING:
assert isinstance(result, dict)
return result

@cli.register_custom_action(cls_names="Project")
@exc.on_http_error(exc.GitlabDeleteError)
Expand Down
Loading