Gitlab
GitLabIssuesReader #
Bases: BaseReader
GitLab issues reader.
Source code in llama-index-integrations/readers/llama-index-readers-gitlab/llama_index/readers/gitlab/issues/base.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
|
IssueState #
Bases: Enum
Issue type.
Used to decide what issues to retrieve.
Attributes:
Name | Type | Description |
---|---|---|
- |
OPEN
|
Issues that are open. |
- |
CLOSED
|
Issues that are closed. |
- |
ALL
|
All issues, open and closed. |
Source code in llama-index-integrations/readers/llama-index-readers-gitlab/llama_index/readers/gitlab/issues/base.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
IssueType #
Bases: Enum
Issue type.
Used to decide what issues to retrieve.
Attributes:
Name | Type | Description |
---|---|---|
- |
ISSUE
|
Issues. |
- |
INCIDENT
|
Incident. |
- |
TEST_CASE
|
Test case. |
- |
TASK
|
Task. |
Source code in llama-index-integrations/readers/llama-index-readers-gitlab/llama_index/readers/gitlab/issues/base.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
Scope #
Bases: Enum
Scope.
Used to determine the scope of the issue.
Attributes:
Name | Type | Description |
---|---|---|
- |
CREATED_BY_ME
|
Issues created by the authenticated user. |
- |
ASSIGNED_TO_ME
|
Issues assigned to the authenticated user. |
- |
ALL
|
All issues. |
Source code in llama-index-integrations/readers/llama-index-readers-gitlab/llama_index/readers/gitlab/issues/base.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
load_data #
load_data(assignee: Optional[Union[str, int]] = None, author: Optional[Union[str, int]] = None, confidential: Optional[bool] = None, created_after: Optional[datetime] = None, created_before: Optional[datetime] = None, iids: Optional[List[int]] = None, issue_type: Optional[IssueType] = None, labels: Optional[List[str]] = None, milestone: Optional[str] = None, non_archived: Optional[bool] = None, scope: Optional[Scope] = None, search: Optional[str] = None, state: Optional[IssueState] = OPEN, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, **kwargs: Any) -> List[Document]
Load group or project issues and converts them to documents. Please refer to the GitLab API documentation for the full list of parameters.
Each issue is converted to a document by doing the following:
- The doc_id of the document is the issue number.
- The text of the document is the concatenation of the title and the description of the issue.
- The extra_info of the document is a dictionary with the following keys:
- state: State of the issue.
- labels: List of labels of the issue.
- created_at: Date when the issue was created.
- closed_at: Date when the issue was closed. Only present if the issue is closed.
- url: URL of the issue.
- source: URL of the issue. More convenient for humans.
- assignee: username of the user assigned to the issue. Only present if the issue is assigned.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
-
|
assignee
|
Username or ID of the user assigned to the issue. |
required |
-
|
author
|
Username or ID of the user that created the issue. |
required |
-
|
confidential
|
Filter confidential issues. |
required |
-
|
created_after
|
Filter issues created after the specified date. |
required |
-
|
created_before
|
Filter issues created before the specified date. |
required |
-
|
iids
|
Return only the issues having the given iid. |
required |
-
|
issue_type
|
Filter issues by type. |
required |
-
|
labels
|
List of label names, issues must have all labels to be returned. |
required |
-
|
milestone
|
The milestone title. |
required |
-
|
non_archived
|
Return issues from non archived projects. |
required |
-
|
scope
|
Return issues for the given scope. |
required |
-
|
search
|
Search issues against their title and description. |
required |
-
|
state
|
State of the issues to retrieve. |
required |
-
|
updated_after
|
Filter issues updated after the specified date. |
required |
-
|
updated_before
|
Filter issues updated before the specified date. |
required |
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: List of documents. |
Source code in llama-index-integrations/readers/llama-index-readers-gitlab/llama_index/readers/gitlab/issues/base.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
|
GitLabRepositoryReader #
Bases: BaseReader
Source code in llama-index-integrations/readers/llama-index-readers-gitlab/llama_index/readers/gitlab/repository/base.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
load_data #
load_data(ref: str, file_path: Optional[str] = None, path: Optional[str] = None, recursive: bool = False) -> List[Document]
Load data from a GitLab repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ref
|
str
|
The name of a repository branch or commit id |
required |
file_path
|
Optional[str]
|
Path to the file to load. |
None
|
path
|
Optional[str]
|
Path to the directory to load. |
None
|
recursive
|
bool
|
Whether to load files recursively. |
False
|
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: List of documents loaded from the repository |
Source code in llama-index-integrations/readers/llama-index-readers-gitlab/llama_index/readers/gitlab/repository/base.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|