summaryrefslogtreecommitdiff
path: root/app/controllers/projects/hooks_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/hooks_controller.rb')
-rw-r--r--app/controllers/projects/hooks_controller.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb
index 5fd4f855dec..d781e7679a6 100644
--- a/app/controllers/projects/hooks_controller.rb
+++ b/app/controllers/projects/hooks_controller.rb
@@ -1,3 +1,4 @@
+#encoding: utf-8
class Projects::HooksController < Projects::ApplicationController
# Authorize
before_action :authorize_admin_project!
@@ -28,12 +29,12 @@ class Projects::HooksController < Projects::ApplicationController
status, message = TestHookService.new.execute(hook, current_user)
if status
- flash[:notice] = 'Hook successfully executed.'
+ flash[:notice] = '钩子执行成功。'
else
- flash[:alert] = "Hook execution failed: #{message}"
+ flash[:alert] = "钩子执行失败:#{message}"
end
else
- flash[:alert] = 'Hook execution failed. Ensure the project has commits.'
+ flash[:alert] = '钩子执行失败。确保项目已提交。'
end
redirect_back_or_default(default: { action: 'index' })