summaryrefslogtreecommitdiff
path: root/app/models/project_services/teamcity_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project_services/teamcity_service.rb')
-rw-r--r--app/models/project_services/teamcity_service.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb
index 3c002a1634b..fb11cad352e 100644
--- a/app/models/project_services/teamcity_service.rb
+++ b/app/models/project_services/teamcity_service.rb
@@ -37,12 +37,19 @@ class TeamcityService < CiService
attr_accessor :response
after_save :compose_service_hook, if: :activated?
+ before_update :reset_password
def compose_service_hook
hook = service_hook || build_service_hook
hook.save
end
+ def reset_password
+ if prop_updated?(:teamcity_url)
+ self.password = nil
+ end
+ end
+
def title
'JetBrains TeamCity CI'
end