Gitlab
GitLab问题读取器 #
基类:EventBaseReader
GitLab 问题读取器。
workflows/handler.py 中的源代码llama_index/readers/gitlab/issues/base.py
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 211 212 213 214 215 216 217 218 | |
问题状态 #
基类:EventEnum
问题类型。
用于决定检索哪些问题。
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
- |
OPEN
|
处于开启状态的问题。 |
- |
CLOSED
|
已关闭的问题。 |
- |
ALL
|
所有问题,包括已打开和已关闭的。 |
workflows/handler.py 中的源代码llama_index/readers/gitlab/issues/base.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
问题类型 #
基类:EventEnum
问题类型。
用于决定检索哪些问题。
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
- |
ISSUE
|
问题。 |
- |
INCIDENT
|
事件。 |
- |
TEST_CASE
|
测试用例。 |
- |
TASK
|
任务。 |
workflows/handler.py 中的源代码llama_index/readers/gitlab/issues/base.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
范围 #
基类:EventEnum
范围。
用于确定问题的范围。
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
- |
CREATED_BY_ME
|
由认证用户创建的问题。 |
- |
ASSIGNED_TO_ME
|
分配给已认证用户的问题。 |
- |
ALL
|
所有问题。 |
workflows/handler.py 中的源代码llama_index/readers/gitlab/issues/base.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
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[作用域] = None, search: Optional[str] = None, state: Optional[IssueState] = OPEN, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, get_all: bool = False, **kwargs: Any) -> List[文档]
加载群组或项目问题并将其转换为文档。请参阅 GitLab API 文档获取完整参数列表。
每个问题通过以下步骤转换为文档:
- 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.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
- assignee
|
分配给该问题的用户名或ID。 |
required | |
- author
|
创建该问题的用户名或ID。 |
required | |
- confidential
|
过滤机密问题。 |
required | |
- created_after
|
筛选在指定日期之后创建的问题。 |
required | |
- created_before
|
筛选在指定日期之前创建的问题。 |
required | |
- iids
|
仅返回具有指定 iid 的问题。 |
required | |
- issue_type
|
按类型筛选问题。 |
required | |
- labels
|
标签名称列表,问题必须包含所有指定标签才能被返回。 |
required | |
- milestone
|
里程碑标题。 |
required | |
- non_archived
|
返回未归档项目中的问题。 |
required | |
- scope
|
返回给定范围内的问题。 |
required | |
- search
|
根据标题和描述搜索问题。 |
required | |
- state
|
要检索的问题状态。 |
required | |
- updated_after
|
筛选在指定日期之后更新的问题。 |
required | |
- updated_before
|
筛选在指定日期之前更新的问题。 |
required | |
- get_all
|
获取所有项目,无需分页(适用于长列表)。 |
required |
返回:
| 类型 | 描述 |
|---|---|
List[文档]
|
List[Document]: 文档列表。 |
workflows/handler.py 中的源代码llama_index/readers/gitlab/issues/base.py
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 211 212 213 214 215 216 217 218 | |
GitLab仓库读取器 #
基类:EventBaseReader
workflows/handler.py 中的源代码llama_index/readers/gitlab/repository/base.py
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 92 93 94 | |
load_data #
load_data(ref: str, file_path: Optional[str] = None, path: Optional[str] = None, recursive: bool = False, iterator: bool = False) -> List[文档]
从 GitLab 仓库加载数据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
ref
|
str
|
仓库分支的名称或提交ID |
required |
file_path
|
Optional[str]
|
要加载文件的路径。 |
None
|
path
|
Optional[str]
|
要加载的目录路径。 |
None
|
recursive
|
bool
|
是否递归加载文件。 |
False
|
iterator
|
bool
|
返回一个自动处理API分页的生成器 |
False
|
返回:
| 类型 | 描述 |
|---|---|
List[文档]
|
List[Document]: 从存储库加载的文档列表 |
workflows/handler.py 中的源代码llama_index/readers/gitlab/repository/base.py
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 | |
选项: 成员:- GitLabIssuesReader - GitLabRepositoryReader