xia_engine_gitlab.engine_wiki.GitlabWikiEngineClient
- class xia_engine_gitlab.engine_wiki.GitlabWikiEngineClient(api_host: str, api_token: str, **kwargs)
Bases:
GitlabEngineClient
- __init__(api_host: str, api_token: str, **kwargs)
Methods
__init__
(api_host, api_token, **kwargs)check_file_exists
(project_id, branch, path)check_response
(response)commit_file
(project_id, branch, path, ...[, ...])create_branch
(project_id, branch_name, ref)create_merge_request
(project_id, title, ...)create_wiki
(project_name, wiki_path, ...)Create wiki page
delete_branch
(project_id, branch_name)delete_wiki
(project_name, wiki_path, ...)Delete wiki page content
get_branch_info
(project_id, branch_name)get_branch_name
(issue_iid, wiki_version)get_default_branch_from_name
(api_endpoint, ...)Get default branch name from the given name
get_file_content
(project_id, branch, path[, ...])Get file content
get_group_id_from_name
(api_endpoint, ...)get_issue_branch_name
(issue_name, issue_iid)get_issue_commit_name
(issue_name, issue_iid)get_issue_iid_from_name
(api_endpoint, ...)get_issue_mr_name
(issue_name, issue_iid)get_merge_request_commits
(project_id, title)get_milestone_branch_name
(milestone_name)get_milestone_id_from_name
(api_endpoint, ...)get_milestone_info_from_issue
(api_endpoint, ...)get_milestone_mr_name
(milestone_name)get_mr_iid_from_branch
(api_endpoint, ...[, ...])get_mr_iid_from_name
(api_endpoint, ...)get_mr_iid_from_title
(api_endpoint, ...)get_project_id_from_name
(api_endpoint, ...)get_wiki
(project_name, wiki_path, wiki_version)Get wiki page content
merge_merge_request
(project_id, title[, ...])pipeline_exists
(api_endpoint, api_token, ...)rebase_merge_request
(project_id, title)split_header_body
(full_content)update_wiki
(project_name, wiki_path, ...)Update wiki page
- create_wiki(project_name: str, wiki_path: str, wiki_version: str, wiki_content: str)
Create wiki page
- Parameters
project_name – Project name
wiki_path – document id
wiki_version – document version
wiki_content – database content
- delete_wiki(project_name: str, wiki_path: str, wiki_version: str)
Delete wiki page content
- Parameters
project_name – Project name
wiki_path – document id
wiki_version – document version
- classmethod get_default_branch_from_name(api_endpoint: str, api_token: str, project_id: int) str
Get default branch name from the given name
- Parameters
api_endpoint –
api_token –
project_id –
Returns:
- get_file_content(project_id, branch: str, path: str, with_encoding: bool = False)
Get file content
- Returns
when with_encoding is true and the content is binary, will return base64 string instead binary result
- get_wiki(project_name: str, wiki_path: str, wiki_version: str)
Get wiki page content
- Parameters
project_name – Project name
wiki_path – document id
wiki_version – document version
- update_wiki(project_name: str, wiki_path: str, wiki_version: str, wiki_content: str)
Update wiki page
- Parameters
project_name – Project name
wiki_path – document id
wiki_version – document version
wiki_content – database content