Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 39bec8e

Browse files
committed
TeamCity service: use config_boolean_true?; update doc
1 parent d395f0c commit 39bec8e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

docs/teamcity

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[TeamCity](https://www.jetbrains.com/teamcity/) is a continuous integration server that automates the building and testing of your software.
2-
The GitHub TeamCity service can be used to trigger builds after code has been pushed to your git repository.
2+
The GitHub TeamCity service can be used in two ways:
3+
* to trigger builds after code has been pushed to your git repository; (Default)
4+
* to enforce checking for changes after code has been pushed to your git repository. (see 7)
35

46
Install Notes
57
-------------
@@ -24,7 +26,10 @@ Install Notes
2426
6. "Full branch ref" if enabled full branch reference (e.g. 'refs/heads/master')
2527
will be send to TeamCity server. Otherwise 'refs/heads' will be omitted.
2628

27-
7. Since TeamCity uses BASIC authentication, it is highly recommended that the
29+
7. "Check for pending changes" if enabled, service will force TeamCity server
30+
to check for pending changes. Service will not trigger new build.
31+
32+
8. Since TeamCity uses BASIC authentication, it is highly recommended that the
2833
TeamCity server use HTTPS/SSL to protect the password that is passed
2934
unencrypted over the internet.
3035

lib/services/teamcity.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Service::TeamCity < Service
1414
def receive_push
1515
return if payload['deleted']
1616

17-
check_for_changes_only = data['check_for_changes_only']
17+
check_for_changes_only = config_boolean_true?('check_for_changes_only')
1818

1919
branches = data['branches'].to_s.split(/\s+/)
2020
ref = payload["ref"].to_s
@@ -35,6 +35,7 @@ def receive_push
3535
build_type_ids.split(",").each do |build_type_id|
3636

3737
if check_for_changes_only
38+
# This is undocumented call. TODO: migrate to REST API (TC at least 8.0)
3839
res = http_get "httpAuth/action.html", :checkForChangesBuildType => build_type_id
3940
else
4041
res = http_get "httpAuth/action.html", :add2Queue => build_type_id, :branchName => branch

0 commit comments

Comments
 (0)