You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.
Default behavior of TC REST API is that if not explicitly specified the locator gets only builds on the default branch.
Request "/httpAuth/app/rest/builds?locator=number:10999"
does not work if build 10999 is not on default branch. It is documented, thought not quite obvious behavior. Unfortunately, in the 3.5 release it isn't possible to specify build number and branch in the same locator. To solve this i modified WithDimensions method to accept the build number.
Now i can search like this:
// find build by number and build type id
var bl = BuildLocator.WithDimensions(
number:"10999",
branch:"default:any",
buildType: BuildTypeLocator.WithId("MyBuildId"));
Subject: [PATCH] Specifiy number in the dimensions locator
Default behavior of TC REST API is that if not explicitly specified the locator gets only builds on the default branch.
Request "/httpAuth/app/rest/builds?locator=number:10999"
does not work if build 10999 is not on default branch. It is documented, thought not quite obvious behavior. Unfortunately, in the 3.5 release it isn't possible to specify build number and branch in the same locator. To solve this i modified WithDimensions method to accept the build number.
Now i can search like this:
// find build by number and build type id
var bl = BuildLocator.WithDimensions(
number:"10999",
branch:"default:any",
buildType: BuildTypeLocator.WithId("MyBuildId"));
Subject: [PATCH] Specifiy number in the dimensions locator
src/TeamCitySharp/Locators/BuildLocator.cs | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/TeamCitySharp/Locators/BuildLocator.cs b/src/TeamCitySharp/Locators/BuildLocator.cs
index 1823d6d..bcd12b1 100644
--- a/src/TeamCitySharp/Locators/BuildLocator.cs
+++ b/src/TeamCitySharp/Locators/BuildLocator.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
namespace TeamCitySharp.Locators
@@ -40,7 +40,9 @@ namespace TeamCitySharp.Locators
BuildLocator sinceBuild = null,
DateTime? sinceDate = null,
string[] tags = null,
return new BuildLocator
@@ -58,7 +60,8 @@ namespace TeamCitySharp.Locators
SinceBuild = sinceBuild,
SinceDate = sinceDate,
Tags = tags,
@@ -86,13 +89,13 @@ namespace TeamCitySharp.Locators
return "id:" + Id;
}
- }
1.8.3.msysgit.0
The text was updated successfully, but these errors were encountered: