diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index f8bd50624..fb2d9b433 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -328,7 +328,8 @@ class ApplicationController < ActionController::Base
def current_user
# User.current
- User.find_by_id 1
+ User.find_by_id 50207
+ # User.find_by_id 36390
# nil
end
diff --git a/app/services/gitea/labels/delete_service.rb b/app/services/gitea/labels/delete_service.rb
index 8cf043169..50a7c6da1 100644
--- a/app/services/gitea/labels/delete_service.rb
+++ b/app/services/gitea/labels/delete_service.rb
@@ -23,12 +23,17 @@ class Gitea::Labels::DeleteService < Gitea::ClientService
end
def render_result(response)
- body = JSON.parse(response.body)
+ return_body = response.body
+ if return_body.present?
+ body = JSON.parse(response.body)
+ else
+ body = []
+ end
case response.status
when 204
body
else
- {status: -1, message: "#{body['message']}"}
+ {status: -1, message: "#{body['message'] if body.present?}"}
end
end
end
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb
index f091f8c6f..4b8660ac2 100644
--- a/app/services/projects/create_service.rb
+++ b/app/services/projects/create_service.rb
@@ -32,7 +32,8 @@ class Projects::CreateService < ApplicationService
project_language_id: params[:project_language_id],
is_public: get_is_public,
ignore_id: params[:ignore_id],
- license_id: params[:license_id]
+ license_id: params[:license_id],
+ identifier: params[:repository_name] #新增,hs
}
end
diff --git a/app/views/projects/create.json.jbuilder b/app/views/projects/create.json.jbuilder
index 818eb0180..0a586a654 100644
--- a/app/views/projects/create.json.jbuilder
+++ b/app/views/projects/create.json.jbuilder
@@ -1 +1 @@
-json.extract! @project, :id, :name
+json.extract! @project, :id, :name,:identifier
diff --git a/db/migrate/20200212055807_add_values_to_issue_tags_and_trackers.rb b/db/migrate/20200212055807_add_values_to_issue_tags_and_trackers.rb
new file mode 100644
index 000000000..f296386bd
--- /dev/null
+++ b/db/migrate/20200212055807_add_values_to_issue_tags_and_trackers.rb
@@ -0,0 +1,17 @@
+class AddValuesToIssueTagsAndTrackers < ActiveRecord::Migration[5.2]
+ def change
+ issue_status = %w(新增 正在解决 已解决 反馈 关闭 拒绝)
+ trackers = %w(缺陷 功能 支持 任务 周报)
+ issue_status.each_with_index do |s, index|
+ unless IssueStatus.exists?(name: s)
+ IssueStatus.create!(name: s, is_closed: (index == 4) , is_default: (index == 0), position: index+1)
+ end
+ end
+
+ trackers.each_with_index do |s, index|
+ unless Tracker.exists?(name: s)
+ Tracker.create!(name: s, is_in_chlog: (index == 0 || index == 1) , is_in_roadmap: (index != 0 || index != 2), position: index+1)
+ end
+ end
+ end
+end
diff --git a/public/react/build/asset-manifest.json b/public/react/build/asset-manifest.json
index b30ca8856..fe24914f6 100644
--- a/public/react/build/asset-manifest.json
+++ b/public/react/build/asset-manifest.json
@@ -26,7 +26,7 @@
"./static/js/12.9ca5dfc1.chunk.js": "./static/js/12.9ca5dfc1.chunk.js",
"./static/js/120.8021674f.chunk.js": "./static/js/120.8021674f.chunk.js",
"./static/js/121.f57b086f.chunk.js": "./static/js/121.f57b086f.chunk.js",
- "./static/js/122.c8196fb2.chunk.js": "./static/js/122.c8196fb2.chunk.js",
+ "./static/js/122.43f27ff6.chunk.js": "./static/js/122.43f27ff6.chunk.js",
"./static/js/123.b7aa9446.chunk.js": "./static/js/123.b7aa9446.chunk.js",
"./static/js/124.ae46fcd4.chunk.js": "./static/js/124.ae46fcd4.chunk.js",
"./static/js/125.073fe041.chunk.js": "./static/js/125.073fe041.chunk.js",
@@ -52,7 +52,7 @@
"./static/js/143.723e4390.chunk.js": "./static/js/143.723e4390.chunk.js",
"./static/js/144.203bf146.chunk.js": "./static/js/144.203bf146.chunk.js",
"./static/js/145.ea5c842c.chunk.js": "./static/js/145.ea5c842c.chunk.js",
- "./static/js/146.232621fc.chunk.js": "./static/js/146.232621fc.chunk.js",
+ "./static/js/146.d13e2e8e.chunk.js": "./static/js/146.d13e2e8e.chunk.js",
"./static/js/147.6302de52.chunk.js": "./static/js/147.6302de52.chunk.js",
"./static/js/148.7cdd332d.chunk.js": "./static/js/148.7cdd332d.chunk.js",
"./static/js/149.2fd0e461.chunk.js": "./static/js/149.2fd0e461.chunk.js",
@@ -254,7 +254,7 @@
"./static/js/98.9ce0583a.chunk.js": "./static/js/98.9ce0583a.chunk.js",
"./static/js/99.edbfdfe7.chunk.js": "./static/js/99.edbfdfe7.chunk.js",
"main.css": "./static/css/main.c0718fb6.css",
- "main.js": "./static/js/main.c8abd596.js",
+ "main.js": "./static/js/main.914b0c99.js",
"static/media/KaTeX_AMS-Regular.ttf": "static/media/KaTeX_AMS-Regular.aaf4eee9.ttf",
"static/media/KaTeX_AMS-Regular.woff": "static/media/KaTeX_AMS-Regular.7f06b4e3.woff",
"static/media/KaTeX_AMS-Regular.woff2": "static/media/KaTeX_AMS-Regular.e78e28b4.woff2",
diff --git a/public/react/build/index.html b/public/react/build/index.html
index b41f486c2..ab76ca52e 100644
--- a/public/react/build/index.html
+++ b/public/react/build/index.html
@@ -24,7 +24,7 @@
_host = 'https://ali-cdn.educoder.net/react/build/'
}
document.write('