langchain.utilities.gitlab.GitLabAPIWrapper¶
class langchain.utilities.gitlab.GitLabAPIWrapper[source]¶
Bases: BaseModel
Wrapper for GitLab API.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param gitlab_base_branch: Optional[str] = None¶
The base branch in the GitLab repository, used for comparisons.
Usually ‘main’ or ‘master’. Defaults to ‘main’.
param gitlab_branch: Optional[str] = None¶
The specific branch in the GitLab repository where the bot will make
its commits. Defaults to ‘main’.
param gitlab_personal_access_token: Optional[str] = None¶
Personal access token for the GitLab service, used for authentication.
param gitlab_repository: Optional[str] = None¶
The name of the GitLab repository, in the form {username}/{repo-name}.
comment_on_issue(comment_query: str) → str[source]¶
Adds a comment to a gitlab issue
Parameters:
comment_query(str): a string which contains the issue number,
two newlines, and the comment.
for example: “1
Working on it now”
adds the comment “working on it now” to issue 1
Returns:str: A success or failure message
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values