xia_gpt_engine_gitlab.engine_notes.GitlabIssueDiscussionNoteEngineClient

class xia_gpt_engine_gitlab.engine_notes.GitlabIssueDiscussionNoteEngineClient(api_host: str, api_token: str, **kwargs)

Bases: GitlabDiscussionNoteEngineClient

__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_note(project_name, parent_name, ...)

Create note page

delete_branch(project_id, branch_name)

delete_note(project_name, parent_name, ...)

get_branch_info(project_id, branch_name)

get_default_branch_from_name(api_endpoint, ...)

Get default branch name from the given name

get_file_content(project_id, branch, path)

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_mr_name(milestone_name)

get_mr_iid_from_name(api_endpoint, ...)

get_note(project_name, parent_name, ...)

Update note page

get_project_id_from_name(api_endpoint, ...)

merge_merge_request(project_id, title[, ...])

update_note(project_name, parent_name, ...)

Update Note

create_note(project_name: str, parent_name: str, discussion_id: str, note_content: str)

Create note page

Parameters
  • project_name – Project name

  • parent_name – Parent name which could hold the note

  • discussion_id – Discussion ID

  • note_content – database content

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_note(project_name: str, parent_name: str, discussion_id: str, note_id: int)

Update note page

Parameters
  • project_name – Project name

  • parent_name – Parent name which could hold the note

  • discussion_id – Discussion ID

  • note_id – Note ID

update_note(project_name: str, parent_name: str, discussion_id: str, note_id: int, note_content: str)

Update Note

Parameters
  • project_name – Project name

  • parent_name – Parent name which could hold the note

  • discussion_id – Discussion ID

  • note_id – Note ID

  • note_content – Note content