Changesets Collection

The changeset collection Changesets is used by the Repository object and provides access to the list of changesets associated with the current build for each repository. It includes functions to select changesets in the collection. The changesets are sorted by commit date - earliest first, or topographical order for git repositories.

Properties

Name Description Return Type Usage Example
Count Returns number of changesets in the collection Integer $Source.RepoName.Changesets.Count$ 2

Functions

Name and Parameters Description Return Type Usage Example
First() Gets first changeset from the collection Changeset $Source.RepoName.Changesets.First().Comment$ "Initial commit"
First(string property, string operator, string value, [bool ignoreCase]) Gets first matching changeset from the collection for given property using given operator. See list of valid operators below. Changeset $Source.RepoName.Changesets.First("branch", Equals, "master").Created$ "11/09/2014 1:48:36 AM"
IsEmpty() Returns true if there are no changesets in the collection Boolean $Source.RepoName.Changesets.IsEmpty()$ False
Item(integer index) Gets a changeset in the collection by zero-based index number Changeset $Source.RepoName.Changesets.Item(0).Comment$ "Initial commit"
Last() Gets last changeset from the collection Changeset $Source.RepoName.Changesets.Last().Comment$ "Added readme.md"
Last(string property, string operator, string value, [bool ignoreCase]) Gets last matching changeset from the collection for given property using given operator. See list of valid operators below. Changeset $Source.RepoName.Changesets.Last("branch", StartsWith, "Mas", true).Created$ "11/09/2014 2:16:12 AM"
Select(string property) Returns a string collection of property values String Collection $Source.RepoName.Changesets.Select("branch").Join(",")$ "master, dev, feature_x"
Where(string property, string operator, string value, [bool ignoreCase]) Gets matching changesets from collection for given property using given operator. See list of valid operators below. Changesets Collection $Source.RepoName.Changesets.Where("branch", Equals, "master").First().Created$ "11/09/2014 1:48:36 AM"

Operators

  • Equals
  • DoesNotEqual
  • Contains
  • DoesNotContain
  • StartsWith
  • DoesNotStartWith
  • EndsWith
  • DoesNotEndWith
  • IsRegexMatch
  • IsNotRegexMatch