fix merge

This commit is contained in:
jasder 2021-04-01 15:07:12 +08:00
commit b3288937c9
20 changed files with 381 additions and 80 deletions

View File

@ -1,6 +1,17 @@
# Changelog # Changelog
## [v3.0.0](https://github.com/go-gitea/gitea/releases/tag/v1.13.1) - 2020-12-29 ## [v3.0.1](https://forgeplus.trustie.net/projects/jasder/forgeplus/releases) - 2021-03-19
* BUGFIXES
* Fix pull reqeust模块中用户头像显示问题
* Fix 解决issue模块中指派用户的问题
* Fix 解决合并请求失败的后显示message信息不正确
* Fix 代码目录页面readme文件提供单独的api
* ENHANCEMENTS
* 重构项目详情页面
## [v3.0.0](https://forgeplus.trustie.net/projects/jasder/forgeplus/releases) - 2020-12-29
* BUGFIXES * BUGFIXES
* Fix pull reqeust的访问权限问题 (#14156) (#14171) * Fix pull reqeust的访问权限问题 (#14156) (#14171)

View File

@ -11,13 +11,32 @@ Trustie (确实)是一个以大众化协同开发、开放式资源共享、
## 部署 ## 部署
### 1. 安装依赖包 ### Depends Versions
```bash * Ruby 2.4.5
bundle install
* Rails ~> 5.2
* MySql ~> 5.6
* Redis 5+
* NodeJS > 13.0.0
### Steps
#### 1. 克隆稳定版本
```
git clone -b standalone https://git.trustie.net/jasder/forgeplus.git
``` ```
### 2. 配置初始化文件 #### 2. 安装依赖包
```bash
cd forgeplus && bundle install
```
#### 3. 配置初始化文件
进入项目根目录执行一下命令: 进入项目根目录执行一下命令:
```bash ```bash
@ -27,10 +46,24 @@ touch config/redis.yml
touch config/elasticsearch.yml touch config/elasticsearch.yml
``` ```
### 3. 配置gitea服务(可选) #### 4. 配置数据库
数据库配置信息请查看/config/database.yml文件
项目默认采用mysql数据库, 如需更改,请自行修改配置信息,
默认配置如下:
```bash
default: &default
adapter: mysql2
host: 127.0.0.1
encoding: utf8
username: root
password: 123456
```
#### 5. 配置gitea服务(可选)
**如需要部署自己的gitea平台请参考gitea官方平台https://docs.gitea.io/zh-cn/install-from-binary/** **如需要部署自己的gitea平台请参考gitea官方平台https://docs.gitea.io/zh-cn/install-from-binary/**
**因目前gitea平台api受限暂时推荐从forge平台获取gitea部署文件进行部署https://forgeplus.trustie.net/projects/jasder/gitea-binary **因目前gitea平台api受限暂时推荐从forge平台获取gitea部署文件进行部署https://forgeplus.trustie.net/projects/Trustie/gitea-binary**
#### 配置gitea服务步骤 #### 配置gitea服务步骤
1. 部署gitea服务并注册root账户 1. 部署gitea服务并注册root账户
@ -44,75 +77,89 @@ gitea:
base_url: '/api/v1' base_url: '/api/v1'
``` ```
### 4. 安装redis环境 #### 6. 安装redis环境
**请自行搜索各平台如何安装部署redis环境** **请自行搜索各平台如何安装部署redis环境**
### 5. 创建数据库 #### 7. 创建数据库
**开发环境为development 生成环境为production**
```bash ```bash
rails db:create rails db:create RAILS_ENV=development
``` ```
### 6. 导入数据表结构 #### 8. 导入数据表结构
```bash ```bash
bundle exec rake sync_table_structure:import_csv bundle exec rake sync_table_structure:import_csv
``` ```
### 7. 执行migrate迁移文件 #### 9. 执行migrate迁移文件
**开发环境为development 生成环境为production** **开发环境为development 生成环境为production**
```bash ```bash
rails db:migrate RAILS_ENV=development rails db:migrate RAILS_ENV=development
``` ```
### 8. 启动redis(此处已mac系统为例) #### 10. clone前端代码
**将前端代码克隆到public/react目录下目录结构应该是: public/react/build**
```bash
git clone -b standalone https://git.trustie.net/jasder/build.git
```
#### 11. 启动redis(此处已mac系统为例)
```bash ```bash
redis-server& redis-server&
``` ```
### 9. 启动sidekiq #### 12. 启动sidekiq
**开发环境为development 生成环境为production** **开发环境为development 生成环境为production**
```bash ```bash
bundle exec sidekiq -C config/sidekiq.yml -e production -d bundle exec sidekiq -C config/sidekiq.yml -e production -d
``` ```
### 10. 启动rails服务 #### 13. 启动rails服务
```bash ```bash
rails s rails s
``` ```
### 11. 浏览器访问 #### 14. 浏览器访问
在浏览器中输入如下地址访问: 在浏览器中输入如下地址访问:
```bash ```bash
http://localhost:3000/ http://localhost:3000/
``` ```
#### 15. 浏览器访问
在浏览器中输入如下地址访问:
```bash
http://localhost:3000/
```
#### 15. 其他说明
通过页面注册都第一个用户为平台管理员用户
## 页面展示 ## 页面展示
- 代码库 - 代码库
![](docs/figs/code.png) ![](docs/figs/code.png?raw=true)
- 任务管理 - 任务管理
![](docs/figs/issue_manage.png) ![](docs/figs/issue_manage.png?raw=true)
- 任务查看 - 任务查看
![](docs/figs/issue_view.png) ![](docs/figs/issue_view.png?raw=true)
- 任务指派 - 任务指派
![](docs/figs/issue_assign2.png) ![](docs/figs/issue_assign2.png?raw=true)
- 里程碑 - 里程碑
![](docs/figs/milestone.png) ![](docs/figs/milestone.png?raw=true)
### API ### API
- [API](api_document.md) - [API文档](https://forgeplus.trustie.net/docs/api)
- [API](showdoc.com.cn) - [API](showdoc.com.cn)
账号forgeplus@admin.com 密码forge123 账号forgeplus@admin.com 密码forge123

View File

@ -4,7 +4,7 @@ class Projects::ProjectUnitsController < Projects::BaseController
end end
def create def create
if current_user.admin? || @project.owner?(current_user) if current_user.admin? || @project.manager?(current_user)
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
ProjectUnit.update_by_unit_types!(@project, unit_types) ProjectUnit.update_by_unit_types!(@project, unit_types)
render_ok render_ok

View File

@ -17,7 +17,7 @@ class ProjectsController < ApplicationController
menu.append(menu_hash_by_name("devops")) if @project.has_menu_permission("devops") menu.append(menu_hash_by_name("devops")) if @project.has_menu_permission("devops")
menu.append(menu_hash_by_name("versions")) if @project.has_menu_permission("versions") menu.append(menu_hash_by_name("versions")) if @project.has_menu_permission("versions")
menu.append(menu_hash_by_name("activity")) menu.append(menu_hash_by_name("activity"))
menu.append(menu_hash_by_name("setting")) if current_user.admin? || @project.owner?(current_user) menu.append(menu_hash_by_name("setting")) if current_user.admin? || @project.manager?(current_user)
render json: menu render json: menu
end end
@ -118,7 +118,7 @@ class ProjectsController < ApplicationController
end end
def destroy def destroy
if current_user.admin? || @project.owner?(current_user) if current_user.admin? || @project.manager?(current_user)
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
Gitea::Repository::DeleteService.new(@project.owner, @project.identifier).call Gitea::Repository::DeleteService.new(@project.owner, @project.identifier).call
@project.destroy! @project.destroy!

View File

@ -1,28 +1,57 @@
class SettingsController < ApplicationController class SettingsController < ApplicationController
def show def show
@old_projects_url = nil @old_projects_url = nil
@old_projects_url = "https://www.trustie.net/users/#{current_user.try(:login)}/projects" if User.current.logged? get_add_menu
get_common_menu
get_personal_menu
@add = Site.add.select(:id, :name, :url, :key) end
private
def get_add_menu
@add = []
Site.add.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site|
hash = {}
site.each {|k, v|
hash.merge!("#{k}": get_site_url(k, v))
}
@add << hash
end
end
def get_common_menu
@common = {}
Site.common.select(:url, :key).each do |site|
next if site["url"].to_s.include?("current_user") && !User.current.logged?
@common.merge!("#{site["key"]}": append_http(reset_site_url(site["url"])))
end
end
def get_personal_menu
@personal = [] @personal = []
if User.current.logged? if User.current.logged?
Site.personal.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site| Site.personal.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site|
hash = {} hash = {}
site.each {|k, v| site.each {|k, v|
hash.merge!("#{k}": v.to_s.include?("current_user") ? v.split('current_user').join(current_user&.login) : v) hash.merge!("#{k}": get_site_url(k, v))
} }
@personal << hash @personal << hash
end end
end end
end
@common = [] def get_site_url(key, value)
Site.common.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site| key.to_s === "url" ? append_http(reset_site_url(value)) : reset_site_url(value)
next if site["url"].to_s.include?("current_user") && !User.current.logged? end
hash = {}
site.each {|k, v| def reset_site_url(url)
hash.merge!("#{k}": v.to_s.include?("current_user") ? v.split('current_user').join(current_user&.login) : v) return url unless url.to_s.include?("current_user")
}
@common << hash split_arr = url.split('current_user')
end split_arr.length > 1 ? split_arr.join(current_user&.login) : (split_arr << current_user&.login).join('')
end
def append_http(url)
url.to_s.start_with?("http") ? url : [request.protocol, request.host_with_port, url].join('')
end end
end end

View File

@ -28,7 +28,7 @@ module RepositoriesHelper
def render_commit_author(author_json) def render_commit_author(author_json)
return nil if author_json.blank? return nil if author_json.blank?
find_user_by_login author_json['login'] find_user_by_login author_json['name']
end end
def readme_render_decode64_content(str, path) def readme_render_decode64_content(str, path)

View File

@ -37,6 +37,8 @@
# rep_identifier :string(255) # rep_identifier :string(255)
# project_category_id :integer # project_category_id :integer
# project_language_id :integer # project_language_id :integer
# license_id :integer
# ignore_id :integer
# praises_count :integer default("0") # praises_count :integer default("0")
# watchers_count :integer default("0") # watchers_count :integer default("0")
# issues_count :integer default("0") # issues_count :integer default("0")
@ -50,8 +52,6 @@
# open_devops_count :integer default("0") # open_devops_count :integer default("0")
# recommend :boolean default("0") # recommend :boolean default("0")
# platform :integer default("0") # platform :integer default("0")
# license_id :integer
# ignore_id :integer
# default_branch :string(255) default("master") # default_branch :string(255) default("master")
# website :string(255) # website :string(255)
# #
@ -70,7 +70,6 @@
# index_projects_on_updated_on (updated_on) # index_projects_on_updated_on (updated_on)
# #
class Project < ApplicationRecord class Project < ApplicationRecord
include Matchable include Matchable
include Publicable include Publicable

View File

@ -17,7 +17,56 @@ class Site < ApplicationRecord
# common: 普通链接 # common: 普通链接
enum site_type: { add: 0, personal: 1, common: 2 } enum site_type: { add: 0, personal: 1, common: 2 }
def self.set_default def self.set_default_menu
set_add_menu!
set_personal_menu!
set_common_menu!
end
private
def self.set_add_menu!
adds= [
{name: '新建镜像项目', key: 'add_mirror_project', url: '/projects/mirror/new'},
{name: '新建托管项目', key: 'add_common', url: '/projects/deposit/new'},
{name: '新建组织', key: 'add_r', url: '/organize/new'}]
adds.each { |ele|
Site.find_or_create_by(key: ele[:key]) do |site|
site.name = ele[:name]
site.url = ele[:url]
site.site_type = Site.site_types[:add]
end
}
end
def self.set_personal_menu!
personals = [
{name: '个人中心', key: 'my_page', url: '/users/current_user'},
{name: '我的组织', key: 'my_organizes', url: '/users/current_user/organizes'}
]
personals.each { |ele|
Site.find_or_create_by(key: ele[:key]) do |site|
site.name = ele[:name]
site.url = ele[:url]
site.site_type = Site.site_types[:personal]
end
}
end
def self.set_common_menu!
commons = [
{name: '通知', key: 'notice', url: '/users/current_user/user_messages'},
{name: '找回密码', key: 'lost_password', url: '/account/lost_password'},
{name: '注册', key: 'register', url: '/login?login=false'}
]
commons.each { |ele|
Site.find_or_create_by(key: ele[:key]) do |site|
site.name = ele[:name]
site.url = ele[:url]
site.site_type = Site.site_types[:common]
end
}
end end
end end

View File

@ -1,12 +1,13 @@
# Get a list of all commits from a repository # Get a list of all commits from a repository
class Gitea::Versions::ListService < Gitea::ClientService class Gitea::Versions::ListService < Gitea::ClientService
attr_reader :token, :user_name, :repo attr_reader :token, :user_name, :repo, :args
# sha: SHA or branch to start listing commits from (usually 'master') # sha: SHA or branch to start listing commits from (usually 'master')
def initialize(token, user_name, repo) def initialize(token, user_name, repo, args={})
@token = token @token = token
@user_name = user_name @user_name = user_name
@repo = repo @repo = repo
@args = args
end end
def call def call
@ -16,7 +17,7 @@ class Gitea::Versions::ListService < Gitea::ClientService
private private
def params def params
Hash.new.merge(token: token) args.merge(token: token)
end end
def url def url

View File

@ -37,7 +37,7 @@ class Repositories::DetailService < ApplicationService
end end
def release_suitable def release_suitable
releases = Gitea::Versions::ListService.call(@owner.gitea_token, @owner.try(:login), @repo.try(:identifier)) releases = Gitea::Versions::ListService.call(@owner.gitea_token, @owner.try(:login), @repo.try(:identifier), {page: 1, limit: 1})
releases.is_a?(Hash) && releases[:status] == -1 ? [] : releases releases.is_a?(Hash) && releases[:status] == -1 ? [] : releases
end end

View File

@ -1,5 +1,6 @@
json.author do json.author do
if @project.forge? if @project.forge?
json.id user.id
json.login user.login json.login user.login
json.type user&.type json.type user&.type
json.name user.real_name json.name user.real_name

View File

@ -26,9 +26,9 @@ if @project.forge?
end end
json.author do json.author do
json.partial! 'commit_author', user: render_commit_author(commit['author']) json.partial! 'commit_author', user: render_commit_author(commit['commit']['author']), name: commit['commit']['author']['name']
end end
json.committer do json.committer do
json.partial! 'commit_author', user: render_commit_author(commit['committer']) json.partial! 'commit_author', user: render_commit_author(commit['commit']['committer']), name: commit['commit']['committer']['name']
end end
end end

View File

@ -4,5 +4,8 @@ if user
json.name user.real_name json.name user.real_name
json.image_url url_to_avatar(user) json.image_url url_to_avatar(user)
else else
json.nil! json.id nil
json.login name
json.name name
json.image_url File.join("avatars/User","b")
end end

View File

@ -5,6 +5,7 @@ else
json.total_count @hash_commit[:total_count] json.total_count @hash_commit[:total_count]
json.commits do json.commits do
json.array! @hash_commit[:body] do |commit| json.array! @hash_commit[:body] do |commit|
json.commit1 commit
commiter = commit['committer'] commiter = commit['committer']
if commiter.present? if commiter.present?
commit_user_id = commiter['id'] commit_user_id = commiter['id']
@ -17,7 +18,13 @@ else
if forge_user if forge_user
json.partial! 'author', user: forge_user json.partial! 'author', user: forge_user
else else
json.author nil json.author do
json.id nil
json.login commit['commit']['author']['name']
json.type nil
json.name commit['commit']['author']['name']
json.image_url File.join("avatars/User","b")
end
end end
end end
end end

View File

@ -61,7 +61,7 @@ json.release_versions do
json.tag_name release["tag_name"] json.tag_name release["tag_name"]
json.created_at format_time(release["created_at"].to_time) json.created_at format_time(release["created_at"].to_time)
end end
json.total_count @result[:release].size json.total_count @repository&.version_releases.size
end end
json.branches do json.branches do
json.list @result[:branch].each do |branch| json.list @result[:branch].each do |branch|
@ -93,3 +93,5 @@ json.contributors do
json.total_count total_count json.total_count total_count
end end
json.languages @result[:language] json.languages @result[:language]
json.partial! 'author', locals: { user: @project.owner }

View File

@ -45,18 +45,15 @@ json.setting do
json.main_site current_laboratory.main_site? json.main_site current_laboratory.main_site?
json.new_course default_course_links json.new_course default_course_links
json.old_projects_url @old_projects_url
json.add do json.add do
json.array! @add, :name, :url, :key json.array! @add
end end
json.personal do json.personal do
json.array! @personal json.array! @personal
end end
json.common do json.common @common
json.array! @common
end
end end

View File

@ -11,6 +11,7 @@
# #
default: &default default: &default
adapter: mysql2 adapter: mysql2
host: 127.0.0.1
encoding: utf8 encoding: utf8
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root username: root
@ -51,5 +52,3 @@ test:
production: production:
<<: *default <<: *default
database: forge_production database: forge_production
username: educoderplus
password: <%= ENV['EDUCODERPLUS_DATABASE_PASSWORD'] %>

View File

@ -8,5 +8,7 @@ class CreateSites < ActiveRecord::Migration[5.2]
t.timestamps t.timestamps
end end
Site.set_default_menu
end end
end end

View File

@ -16,13 +16,18 @@
## Steps ## Steps
### 1. 安装依赖包 ### 1. 克隆稳定版本仓库
```
git clone -b standalone https://git.trustie.net/jasder/forgeplus.git
```
### 2. 安装依赖包
```bash ```bash
bundle install bundle install
``` ```
### 2. 配置初始化文件 ### 3. 配置初始化文件
进入项目根目录执行一下命令: 进入项目根目录执行一下命令:
```bash ```bash
@ -32,10 +37,24 @@ touch config/redis.yml
touch config/elasticsearch.yml touch config/elasticsearch.yml
``` ```
### 3. 配置gitea服务(可选) ### 4. 配置数据库
数据库配置信息请查看/config/database.yml文件
项目默认采用mysql数据库, 如需更改,请自行修改配置信息,
默认配置如下:
```bash
default: &default
adapter: mysql2
host: 127.0.0.1
encoding: utf8
username: root
password: 123456
```
### 4. 配置gitea服务(可选)
**如需要部署自己的gitea平台请参考gitea官方平台https://docs.gitea.io/zh-cn/install-from-binary/** **如需要部署自己的gitea平台请参考gitea官方平台https://docs.gitea.io/zh-cn/install-from-binary/**
**因目前gitea平台api受限暂时推荐从forge平台获取gitea部署文件进行部署https://forgeplus.trustie.net/projects/jasder/gitea-binary** **因目前gitea平台api受限暂时推荐从forge平台获取gitea部署文件进行部署https://forgeplus.trustie.net/projects/Trustie/gitea-binary**
#### 配置gitea服务步骤 #### 配置gitea服务步骤
1. 部署gitea服务并注册root账户 1. 部署gitea服务并注册root账户
@ -49,51 +68,51 @@ gitea:
base_url: '/api/v1' base_url: '/api/v1'
``` ```
### 4. 安装redis环境 ### 5. 安装redis环境
**请自行搜索各平台如何安装部署redis环境** **请自行搜索各平台如何安装部署redis环境**
### 5. 创建数据库 ### 6. 创建数据库
```bash ```bash
rails db:create rails db:create
``` ```
### 6. 导入数据表结构 ### 7. 导入数据表结构
```bash ```bash
bundle exec rake sync_table_structure:import_csv bundle exec rake sync_table_structure:import_csv
``` ```
### 7. 执行migrate迁移文件 ### 8. 执行migrate迁移文件
**开发环境为development 生成环境为production** **开发环境为development 生成环境为production**
```bash ```bash
rails db:migrate RAILS_ENV=development rails db:migrate RAILS_ENV=development
``` ```
### 8. clone前端代码 ### 9. clone前端代码
**将前端代码克隆到public/react目录下目录结构应该是: public/react/build** **将前端代码克隆到public/react目录下目录结构应该是: public/react/build**
```bash ```bash
git clone -b dev_trustie https://git.trustie.net/jasder/build.git git clone -b standalone https://git.trustie.net/jasder/build.git
``` ```
### 9. 启动redis(此处已mac系统为例) ### 10. 启动redis(此处已mac系统为例)
```bash ```bash
redis-server& redis-server&
``` ```
### 10. 启动sidekiq ### 11. 启动sidekiq
**开发环境为development 生成环境为production** **开发环境为development 生成环境为production**
```bash ```bash
bundle exec sidekiq -C config/sidekiq.yml -e production -d bundle exec sidekiq -C config/sidekiq.yml -e production -d
``` ```
### 1`. 启动rails服务 ### 12. 启动rails服务
```bash ```bash
rails s rails s
``` ```
### 12. 浏览器访问 ### 13. 浏览器访问
在浏览器中输入如下地址访问: 在浏览器中输入如下地址访问:
```bash ```bash
http://localhost:3000/ http://localhost:3000/

135
dir.md Normal file
View File

@ -0,0 +1,135 @@
forgeplus
├── app(应用目录)
│   ├── assets(应用静态资源目录)
│   ├── channels(actioncable的频道目录)
│   │   └── application_cable(父类)
│   ├── constraint
│   ├── controllers(应用控制器目录)
│   │   ├── admins(后台管理控制器)
│   │   ├── callbacks
│   │   ├── ci(工作流相关控制器)
│   │   ├── concerns(可反复使用的抽象方法)
│   │   │   ├── admins(对应后台管理模块)
│   │   │   ├── base(父类)
│   │   │   ├── ci(对应工作流模块)
│   │   │   └── repository(对应仓库模块)
│   │   ├── oauth(oauth验证控制器)
│   │   ├── organizations(组织模块控制器)
│   │   ├── projects(项目模块控制器)
│   │   └── users(用户模块控制器)
│   ├── decorators
│   ├── docs(api文档插件)
│   ├── forms(表单验证)
│   │   ├── ci(工作流模块)
│   │   ├── contents(仓库文件模块)
│   │   ├── gitea(gitea模块)
│   │   │   └── user(gitea用户模块)
│   │   ├── project_packages(竞标模块)
│   │   ├── projects(项目模块)
│   │   ├── protected_branches(保护分支模块)
│   │   ├── repositories(仓库模块)
│   │   ├── users(用户模块)
│   │   └── validate(公共模块)
│   ├── helpers(一些控制器帮助方法)
│   ├── imports(导入文件处理)
│   ├── interactors(流程处理器,和service类似比如注册创建项目)
│   ├── jobs(异步任务)
│   ├── libs(应用扩展目录)
│   │   ├── ci(工作流模块)
│   │   │   └── drone
│   │   ├── gitea
│   │   ├── limit_forbid_control
│   │   ├── omniauth
│   │   │   └── strategies
│   │   ├── trustie
│   │   ├── util
│   │   ├── wechat
│   │   └── wechat_oauth
│   ├── mailers(用来存放实现发送邮件功能的文件)
│   ├── models(模型目录)
│   ├── queries(模型查询的封装)
│   │   ├── admins(后台管理模块)
│   │   ├── ci(工作流模块)
│   │   ├── projects(项目模块)
│   │   ├── statistic(统计模块)
│   │   └── users(用户模块)
│   ├── services(业务逻辑的封装)
│   │   ├── admins(后台管理模块)
│   │   ├── branches(仓库分支模块)
│   │   ├── concerns(可反复使用的抽象方法)
│   │   ├── educoder(educoder仓库模块)
│   │   │   └── repository(仓库)
│   │   │   ├── commits(提交)
│   │   │   └── entries(文件)
│   │   ├── gitea(gitea接口封装)
│   │   │   ├── activity(项目统计模块)
│   │   │   ├── chain
│   │   │   ├── hooks(webhook模块)
│   │   │   ├── labels
│   │   │   ├── oauth2
│   │   │   ├── organization(组织模块)
│   │   │   │   ├── organization_user(组织成员)
│   │   │   │   ├── repository(组织仓库)
│   │   │   │   ├── team(组织团队)
│   │   │   │   ├── team_project(组织团队项目)
│   │   │   │   └── team_user(组织团队成员)
│   │   │   ├── pull_request(合并请求模块)
│   │   │   ├── repository(仓库模块)
│   │   │   │   ├── branches(分支)
│   │   │   │   ├── commits(提交)
│   │   │   │   ├── contributors(贡献数)
│   │   │   │   ├── entries(文件)
│   │   │   │   ├── files(所有文件)
│   │   │   │   ├── languages(语言)
│   │   │   │   ├── members(仓库成员)
│   │   │   │   ├── protected_branches(分支保护)
│   │   │   │   ├── readme
│   │   │   │   └── tags(标签)
│   │   │   ├── user(用户)
│   │   │   └── versions(发行版)
│   │   ├── issues(易修)
│   │   ├── libraries
│   │   ├── oauth
│   │   ├── organizations(组织)
│   │   │   └── teams(组织团队)
│   │   ├── private_messages
│   │   ├── project_packages(项目竞标)
│   │   ├── projects(项目)
│   │   ├── protected_branches(分支保护)
│   │   ├── pull_requests(合并请求)
│   │   ├── repositories仓库)
│   │   └── users用户)
│   ├── tasks(可执行任务目录)
│   └── views(控制器对应视图文件目录)
├── bin(存放运行程序的 rails 脚本,以及其他用来部署或运行程序的脚本)
├── cable(actioncable配置目录)
├── config(配置的文件目录)
│   ├── admins(后台管理配置)
│   ├── environments(rails程序的不同运行环境的配置)
│   ├── harmonious_dictionary
│   ├── initializers(加载完gem后会自动加载此目录)
│   └── locales(i18n语言设置目录)
├── db(存放当前数据库的模式,以及数据库迁移文件)
│   └── migrate(用来存放数据库的迁移文件)
├── lib(程序的扩展模块)
│   ├── assets(通常是放置我们使用的插件中用到的assets)
│   ├── educoder
│   └── tasks(可执行任务目录)
├── log(日志目录)
├── public(唯一对外开放的文件夹,其他人可以直接访问这个目录中的东西)
│   ├── assets(编译好的静态资源目录)
│   ├── docs(api文档生成目录)
│   ├── echart(图表目录)
│   ├── editormd(富文本编辑器静态资源目录)
│   ├── fonts(字体目录)
│   ├── images(图片目录)
│   ├── javascripts(脚本目录)
│   ├── options(仓库许可证、gitignore、readme文件目录)
│   ├── react
│   │   └── build(前端编译好的文件目录)
│   └── stylesheets(层叠样式表目录)
├── spec(spec测试目录)
├── test(用于存放单元测试、功能测试及整合测试文件等测试文件)
├── tmp(临时文件例如缓存PID会话文件)
├── vendor(存放第三方代码。经常用来放第三方 gem)
├──   └── assets(通常是放置一些我们从别的地方借用的assets)