The source collection $Source provides access to a collection of repositories associated with the current configuration
Name | Description | Item Type | Usage Example | |
---|---|---|---|---|
N/A | A list of repositories associated with the current configuration | Repository | $Source.Reponame$ | "Mercurial_Test_1" |
Properties
Name | Description | Return Type | Usage Example | |
---|---|---|---|---|
N/A | A list of repositories associated with the current configuration | Repository | $Source.Reponame$ | "Mercurial_Test_1" |
Count | Returns number of repositories in the collection | Integer | $Source.Count$ | 2 |
Functions
Name and Parameters | Description | Return Type | Usage Example | |
---|---|---|---|---|
First() | Gets first repository from the collection | Repository | $Source.First().Url$ | "Initial commit" |
First(string property, string operator, string value, [bool ignoreCase]) | Gets first matching repository from the collection for given property using given operator. See list of valid operators below. | Repository | $Source.First("type", Equals, "git").Name$ | "11/09/2014 1:48:36 AM" |
IsEmpty() | Returns true if there are no repositories in the collection | Boolean | $Source.IsEmpty()$ | False |
Item(integer index) | Gets a repository in the collection by zero-based index number | Repository | $Source.Item(0).Name$ | "Initial commit" |
Last() | Gets last repository from the collection | Repository | $Source.Last().Name$ | "Added readme.md" |
Last(string property, string operator, string value, [bool ignoreCase]) | Gets last matching repository from the collection for given property using given operator. See list of valid operators below. | Repository | $Source.Last("url", Contains, "github", true).Path$ | "11/09/2014 2:16:12 AM" |
Where(string property, string operator, string value, [bool ignoreCase]) | Gets matching repositories from collection for given property using given operator. See list of valid operators below. | Source Collection | $Source.Where("type", Equals, "tfs").First().Url$ | "11/09/2014 1:48:36 AM" |
Operators
Equals
DoesNotEqual
Contains
DoesNotContain
StartsWith
DoesNotStartWith
EndsWith
DoesNotEndWith
IsRegexMatch
IsNotRegexMatch