问题
扩展自 AbstractPackageJoomla 框架的 GitHub API 问题类。
| 链接 | |
|---|---|
| 自 |
1.0 |
| 只读属性 Assignees |
分配者的 GitHub API 对象。 评论的 GitHub API 对象。 事件的 GitHub API 对象。 标签的 GitHub API 对象。 里程碑的 GitHub API 对象。 |
| 包 |
Joomla 框架 |
方法
__construct
构造函数。
__construct(\Joomla\Registry\Registry options = null, \Joomla\Http\Http client = null) :
__get
延迟创建 API 对象的魔术方法
__get( name) : \Joomla\Github\AbstractPackage
create
创建问题。
create( user, repo, title, body = null, assignee = null, milestone = null, string||string|int labels = [], string||string|int assignees = []) :
| 自 |
1.0 |
|---|---|
| 抛出 |
|
参数
- 用户
stringGitHub 仓库所有者的名称。- 仓库
stringGitHub 仓库的名称。- 标题
string新问题的标题。- 正文
string新问题的正文文本。- 分配者
string应将此问题分配到的 GitHub 用户的登录名。- 里程碑
int与此问题关联的里程碑。- 标签
array<string|int, string>与此问题关联的标签。- 分配者
array<string|int, string>要分配到此问题的 GitHub 用户的登录名。
响应
对象
edit
编辑问题。
edit( user, repo, issueId, state = null, title = null, body = null, assignee = null, milestone = null, mixed||string|int labels = []) :
| 自 |
1.0 |
|---|---|
| 抛出 |
|
参数
- 用户
stringGitHub 仓库所有者的名称。- 仓库
stringGitHub 仓库的名称。- 问题ID
int问题编号。- 状态
string问题的可选新状态。[打开,关闭]- 标题
string新问题的标题。- 正文
string新问题的正文文本。- 分配者
string应将此问题分配到的 GitHub 用户的登录名。- 里程碑
int与此问题关联的里程碑。- 标签
array<string|int, mixed>与此问题关联的标签。
响应
对象
fetchUrl
构建并返回请求的完整请求 URL 的方法。此方法将在必要时添加适当的分页详细信息,并将 API URL 放在前面以获取请求的完整 URL。
fetchUrl( path, page, limit) : \Joomla\Uri\Uri
get
获取单个问题。
get( user, repo, issueId) :
| 自 |
1.0 |
|---|---|
| 抛出 |
|
参数
- 用户
stringGitHub 仓库所有者的名称。- 仓库
stringGitHub 仓库的名称。- 问题ID
int问题编号。
响应
对象
getList
列出问题。
getList( filter = null, state = null, labels = null, sort = null, direction = null, \DateTimeInterface since = null, page, limit) :
| 自 |
1.0 |
|---|---|
| 抛出 |
|
参数
- 过滤器
string过滤器类型:分配、创建、提及、订阅。- 状态
string可选的状态,用于按其过滤请求。[打开,关闭]- 标签
string逗号分隔的标签名称列表。例如:bug、ui、@high。- 排序
string排序顺序:创建、更新、评论,默认:创建。- 方向
string列表方向:asc 或 desc,默认:desc。- 自
DateTimeInterface|null仅返回在此时间或之后更新的问题。- 页码
int要从中获取项目的页码。- 限制
int一页上的项目数量。
响应
对象
getListByRepository
列出某个仓库的问题。
getListByRepository( user, repo, milestone = null, state = null, assignee = null, mentioned = null, labels = null, sort = null, direction = null, \DateTimeInterface since = null, page, limit) :
| 自 |
1.0 |
|---|---|
| 抛出 |
|
参数
- 用户
stringGitHub 仓库所有者的名称。- 仓库
stringGitHub 仓库的名称。- 里程碑
string里程碑编号、“无”或 *。- 状态
string可选的状态,用于按其过滤请求。[打开,关闭]- 分配者
string分配者名称、“无”或 *。- 提及
stringGitHub 用户名。- 标签
string逗号分隔的标签名称列表。例如:bug、ui、@high。- 排序
string排序顺序:创建、更新、评论,默认:创建。- 方向
string列表方向:asc 或 desc,默认:desc。- 自
DateTimeInterface|null仅返回在此时间或之后更新的问题。- 页码
int要从中获取项目的页码。- 限制
int一页上的项目数量。
响应
对象
lock
锁定问题。
lock( user, repo, issueId) :
| 自 |
1.4.0 |
|---|---|
| 抛出 |
|
参数
- 用户
stringGitHub 仓库所有者的名称。- 仓库
stringGitHub 仓库的名称。- 问题ID
int问题编号。
响应
对象
processResponse
处理响应并对其进行解码。
processResponse(\Joomla\Http\Response response, expectedCode = 200) :
unlock
解锁问题。
unlock( user, repo, issueId) :
| 自 |
1.4.0 |
|---|---|
| 抛出 |
|
参数
- 用户
stringGitHub 仓库所有者的名称。- 仓库
stringGitHub 仓库的名称。- 问题ID
int问题编号。
响应
对象
属性
分配者
评论
事件
标签
里程碑
包
对象所在的包
| 自 |
1.0 |
|---|
类型
字符串
挂钩事件
包含允许的挂钩事件的数组
| 自 |
1.5.2 |
|---|---|
| 链接 | |
| 注释 |
从 1.4.0 到 1.5.1,此名称为 $events,由于与包子类的命名冲突,因此已重命名 |
类型
array<string|int, mixed>