本文档描述了 Gitea 中的项目(Projects)和里程碑(Milestones)功能,这些功能是用于组织和跟踪 issue 和 pull request 的工具。项目提供看板式(Kanban-style)的面板,用于可视化工作流程,而里程碑则将具有目标日期的 issue 分组,用于发布或冲刺(sprints)。
Gitea 提供了两个互补的工具来组织您的工作
这两个功能可以独立使用,也可以结合使用,以管理您的仓库或组织的工作流程。
来源
一个项目包括
来源
项目提供两种卡片类型
来源
models/project/project.go184-194"] AddColumns["添加自定义列"] MoveIssues["在列之间移动 issue"] Close["完成项目时关闭"]
创建 --> 配置 配置 --> 添加列 添加列 --> 移动 issue 移动 issue --> 关闭
Sources:
- <FileRef file-url="https://github.com/go-gitea/gitea/blob/cbb2e529/routers/web/repo/projects.go#L134-L169" min=134 max=169 file-path="routers/web/repo/projects.go">Hii</FileRef>
- Each column can have a custom title and color
- Issues can be dragged and dropped between columns
- A default column can be set for new issues
- Columns are automatically sorted by the sorting order
Sources:
- <FileRef file-url="https://github.com/go-gitea/gitea/blob/cbb2e529/routers/web/repo/projects.go#L517-L548" min=517 max=548 file-path="routers/web/repo/projects.go">Hii</FileRef>
- Show issue details including labels, assignees, and linked PRs
Sources:
- <FileRef file-url="https://github.com/go-gitea/gitea/blob/cbb2e529/templates/projects/view.tmpl#L3-L123" min=3 max=123 file-path="templates/projects/view.tmpl">Hii</FileRef>
- **Deadline** (optional date)
- **Progress** (calculated from open/closed issues)
```mermaid
classDiagram
class Milestone {
Title: string
Description: string
Deadline: date
Status: open/closed
Progress: percentage
NumIssues: int
NumClosedIssues: int
}
class Issue {
Title: string
Number: int
Status: open/closed
MilestoneID: int
}
Milestone "1" -- "many" Issue : contains
来源
routers/web/repo/milestone.go32-99"] AssignIssues["为里程碑分配 issue"] TrackProgress["跟踪进度"] Close["完成里程碑时关闭"]
创建 --> 配置 配置 --> 分配 issue 分配 issue --> 跟踪进度 跟踪进度 --> 关闭
Sources:
- <FileRef file-url="https://github.com/go-gitea/gitea/blob/cbb2e529/routers/web/repo/milestone.go#L101-L140" min=101 max=140 file-path="routers/web/repo/milestone.go">Hii</FileRef>
- Sorting options (due date, name, completion)
Sources:
- <FileRef file-url="https://github.com/go-gitea/gitea/blob/cbb2e529/routers/web/repo/milestone.go#L32-L99" min=32 max=99 file-path="routers/web/repo/milestone.go">Hii</FileRef>
- Milestone pages list all associated issues and PRs
- Issue filters can be based on project or milestone assignment
Sources:
- [templates/repo/issue/card.tmpl:1-78](
- [models/issues/issue_project.go:16-166](
- [routers/web/repo/milestone.go:241-275](