
    dh                         S r SSKJrJrJr  SSKJr  SSKJr  SSK	J
r
JrJrJrJrJrJrJrJrJrJrJrJrJr  SSKJr  SSKJr  / SQr " S	 S
\5      rg)zGitLab Toolkit.    )DictListOptional)BaseTool)BaseToolkit)COMMENT_ON_ISSUE_PROMPTCREATE_FILE_PROMPTCREATE_PULL_REQUEST_PROMPTCREATE_REPO_BRANCHDELETE_FILE_PROMPTGET_ISSUE_PROMPTGET_ISSUES_PROMPTGET_REPO_FILES_FROM_DIRECTORYGET_REPO_FILES_IN_BOT_BRANCHGET_REPO_FILES_IN_MAINLIST_REPO_BRANCESREAD_FILE_PROMPTSET_ACTIVE_BRANCHUPDATE_FILE_PROMPT)GitLabAction)GitLabAPIWrapper)
get_issues	get_issuecomment_on_issuecreate_pull_requestcreate_file	read_fileupdate_filedelete_filec                   v    \ rS rSr% Sr/ r\\   \S'   \	SS.S\
S\\\      SS 4S	 jj5       rS\\   4S
 jrSrg)GitLabToolkit*   a  GitLab Toolkit.

*Security Note*: This toolkit contains tools that can read and modify
    the state of a service; e.g., by creating, deleting, or updating,
    reading underlying data.

    For example, this toolkit can be used to create issues, pull requests,
    and comments on GitLab.

    See https://python.langchain.com/docs/security for more information.

Parameters:
    tools: List[BaseTool]. The tools in the toolkit. Default is an empty list.
toolsN)included_toolsgitlab_api_wrapperr$   returnc                   Ub  UO[         nSS[        S.SS[        S.SS[        S.SS	[        S.S
S[
        S.SS[        S.SS[        S.SS[        S.SS[        S.SS[        S.SS[        S.SS[        S.SS[        S.SS[        S./nU Vs/ sH  nUS   U;   d  M  UPM     nnU Vs/ sH  n[        US   US    US   US!9PM     nnU " US"9$ s  snf s  snf )#zCreate a GitLabToolkit from a GitLabAPIWrapper.

Args:
    gitlab_api_wrapper: GitLabAPIWrapper. The GitLab API wrapper.

Returns:
    GitLabToolkit. The GitLab toolkit.
r   z
Get Issues)modenamedescriptionr   z	Get Issuer   zComment on Issuer   zCreate Pull Requestr   zCreate Filer   z	Read Filer   zUpdate Filer   zDelete Filecreate_branchzCreate a new branchlist_branches_in_repozGet the list of branchesset_active_branchzChange the active branchlist_files_in_main_branchz)Overview of existing files in Main branchlist_files_in_bot_branchz+Overview of files in current working branchlist_files_from_directoryz@Overview of files in current working branch from a specific pathr(   r)   r*   )r)   r*   r(   api_wrapperr#   )DEFAULT_INCLUDED_TOOLSr   r   r   r
   r	   r   r   r   r   r   r   r   r   r   r   )	clsr%   r$   tools_to_include
operations	operationoperations_filteredactionr#   s	            i/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/agent_toolkits/gitlab/toolkit.pyfrom_gitlab_api_wrapper%GitLabToolkit.from_gitlab_api_wrapper<   s   " -8N>T 	 %$0 $#/ +*6 .-9 &%1 $#/ &%1 &%1 (-1 020 ,20 4C5 3E; 4Z<EG"

T (
'	 $44 ' 	 
 .
 . F^"=1F^.	 . 	 
 


s   C C,Cc                     U R                   $ )zGet the tools in the toolkit.r2   )selfs    r:   	get_toolsGitLabToolkit.get_tools   s    zz     )__name__
__module____qualname____firstlineno____doc__r#   r   r   __annotations__classmethodr   r   strr;   r?   __static_attributes__rB   rA   r:   r!   r!   *   si     E4>
 /3	i ,i  !c+	i 
 
i  i V4> rA   r!   N)rG   typingr   r   r   langchain_core.toolsr   langchain_core.tools.baser   'langchain_community.tools.gitlab.promptr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   %langchain_community.tools.gitlab.toolr   $langchain_community.utilities.gitlabr   r3   r!   rB   rA   r:   <module>rR      sF     ' ' ) 1     ? A
	 @K @rA   